Skip to content

Commit 6ffd4c7

Browse files
YueHaibingdtor
authored andcommitted
Input: tsc200x-core - use kobj_to_dev()
Use kobj_to_dev() instead of container_of() Generated by: scripts/coccinelle/api/kobj_to_dev.cocci Signed-off-by: YueHaibing <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent f519f78 commit 6ffd4c7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/input/touchscreen/tsc200x-core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ static struct attribute *tsc200x_attrs[] = {
338338
static umode_t tsc200x_attr_is_visible(struct kobject *kobj,
339339
struct attribute *attr, int n)
340340
{
341-
struct device *dev = container_of(kobj, struct device, kobj);
341+
struct device *dev = kobj_to_dev(kobj);
342342
struct tsc200x *ts = dev_get_drvdata(dev);
343343
umode_t mode = attr->mode;
344344

0 commit comments

Comments
 (0)