summaryrefslogtreecommitdiff
path: root/drivers/input/touchscreen/ads7846.c
diff options
context:
space:
mode:
authorWang Qing <wangqing@vivo.com>2020-11-09 08:50:55 +0300
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2020-11-09 08:53:18 +0300
commit3fe781f4fab2cfad993807e2f14fa26dec6b9172 (patch)
treead6b1a62851a6cfc62677f47ca1ec1db944e61ee /drivers/input/touchscreen/ads7846.c
parentaf5689fb5c1c0b5ad8d6bfd79ea7d018b4c16f1d (diff)
downloadlinux-3fe781f4fab2cfad993807e2f14fa26dec6b9172.tar.xz
Input: ads7846 - use kobj_to_dev() API
Use kobj_to_dev() instead of container_of(). Signed-off-by: Wang Qing <wangqing@vivo.com> Link: https://lore.kernel.org/r/1604893436-20206-1-git-send-email-wangqing@vivo.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/touchscreen/ads7846.c')
-rw-r--r--drivers/input/touchscreen/ads7846.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c
index 8fd7fc39c4fd..ee74da2ad7b8 100644
--- a/drivers/input/touchscreen/ads7846.c
+++ b/drivers/input/touchscreen/ads7846.c
@@ -481,7 +481,7 @@ SHOW(in1_input, vbatt, vbatt_adjust)
static umode_t ads7846_is_visible(struct kobject *kobj, struct attribute *attr,
int index)
{
- struct device *dev = container_of(kobj, struct device, kobj);
+ struct device *dev = kobj_to_dev(kobj);
struct ads7846 *ts = dev_get_drvdata(dev);
if (ts->model == 7843 && index < 2) /* in0, in1 */