mirror of
https://github.com/torvalds/linux.git
synced 2026-05-22 14:12:07 +02:00
iio: light: tsl2563: Replace flush_scheduled_work() with cancel_delayed_work_sync().
Commit9e61d90115("iio: light: tsl2563: Remove flush_scheduled_work") replaced cancel_delayed_work() + flush_scheduled_work() with cancel_delayed_work_sync() for only tsl2563_probe() side. Do the same thing for tsl2563_remove() side, which was added by commit388be48839("staging:iio: tsl2563 abi fixes and interrupt handling"). Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Link: https://lore.kernel.org/r/3381176e-2f86-24ba-a8ba-c4ce8f416086@I-love.SAKURA.ne.jp Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
parent
4a08069461
commit
76faa32077
|
|
@ -803,12 +803,11 @@ static int tsl2563_remove(struct i2c_client *client)
|
|||
|
||||
iio_device_unregister(indio_dev);
|
||||
if (!chip->int_enabled)
|
||||
cancel_delayed_work(&chip->poweroff_work);
|
||||
cancel_delayed_work_sync(&chip->poweroff_work);
|
||||
/* Ensure that interrupts are disabled - then flush any bottom halves */
|
||||
chip->intr &= ~0x30;
|
||||
i2c_smbus_write_byte_data(chip->client, TSL2563_CMD | TSL2563_REG_INT,
|
||||
chip->intr);
|
||||
flush_scheduled_work();
|
||||
tsl2563_set_power(chip, 0);
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user