Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Input: ads7846 - stop updating dev->power.power_state

This stops the ads7846 driver from using dev->power.power_state; that field is
deprecated (overdue for removal) and the only reason to update it was to make
the /sys/devices/.../power/state files (now removed) work better.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>

authored by

David Brownell and committed by
Dmitry Torokhov
fbb38e30 3b04a611

+4 -4
+4 -4
drivers/input/touchscreen/ads7846.c
··· 116 116 // FIXME remove "irq_disabled" 117 117 unsigned irq_disabled:1; /* P: lock */ 118 118 unsigned disabled:1; 119 + unsigned is_suspended:1; 119 120 120 121 int (*filter)(void *data, int data_idx, int *val); 121 122 void *filter_data; ··· 204 203 static int device_suspended(struct device *dev) 205 204 { 206 205 struct ads7846 *ts = dev_get_drvdata(dev); 207 - return dev->power.power_state.event != PM_EVENT_ON || ts->disabled; 206 + return ts->is_suspended || ts->disabled; 208 207 } 209 208 210 209 static int ads7846_read12_ser(struct device *dev, unsigned command) ··· 796 795 797 796 spin_lock_irq(&ts->lock); 798 797 799 - spi->dev.power.power_state = message; 798 + ts->is_suspended = 1; 800 799 ads7846_disable(ts); 801 800 802 801 spin_unlock_irq(&ts->lock); ··· 811 810 812 811 spin_lock_irq(&ts->lock); 813 812 814 - spi->dev.power.power_state = PMSG_ON; 813 + ts->is_suspended = 0; 815 814 ads7846_enable(ts); 816 815 817 816 spin_unlock_irq(&ts->lock); ··· 873 872 } 874 873 875 874 dev_set_drvdata(&spi->dev, ts); 876 - spi->dev.power.power_state = PMSG_ON; 877 875 878 876 ts->spi = spi; 879 877 ts->input = input_dev;