mirror of
https://github.com/torvalds/linux.git
synced 2024-12-23 03:11:46 +00:00
staging: unisys: visorbus: relocate error-check from isr to registration
It just makes more sense to do the NULL-pointer check when the function is called to enable interrupts, rather than on *every* interrupt. Signed-off-by: Tim Sell <Timothy.Sell@unisys.com> Signed-off-by: David Kershner <david.kershner@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
db2003f524
commit
396e36c9ac
@ -438,8 +438,7 @@ dev_periodic_work(unsigned long __opaque)
|
||||
struct visor_device *dev = (struct visor_device *)__opaque;
|
||||
struct visor_driver *drv = to_visor_driver(dev->device.driver);
|
||||
|
||||
if (drv->channel_interrupt)
|
||||
drv->channel_interrupt(dev);
|
||||
drv->channel_interrupt(dev);
|
||||
mod_timer(&dev->timer, jiffies + POLLJIFFIES_NORMALCHANNEL);
|
||||
}
|
||||
|
||||
@ -561,6 +560,13 @@ EXPORT_SYMBOL_GPL(visorbus_write_channel);
|
||||
void
|
||||
visorbus_enable_channel_interrupts(struct visor_device *dev)
|
||||
{
|
||||
struct visor_driver *drv = to_visor_driver(dev->device.driver);
|
||||
|
||||
if (!drv->channel_interrupt) {
|
||||
dev_err(&dev->device, "%s no interrupt function!\n", __func__);
|
||||
return;
|
||||
}
|
||||
|
||||
dev_start_periodic_work(dev);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(visorbus_enable_channel_interrupts);
|
||||
|
Loading…
Reference in New Issue
Block a user