Skip to content

Commit f519f78

Browse files
YueHaibingdtor
authored andcommitted
Input: ims-pcu - 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 25531d6 commit f519f78

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/input/misc/ims-pcu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1228,7 +1228,7 @@ static struct attribute *ims_pcu_attrs[] = {
12281228
static umode_t ims_pcu_is_attr_visible(struct kobject *kobj,
12291229
struct attribute *attr, int n)
12301230
{
1231-
struct device *dev = container_of(kobj, struct device, kobj);
1231+
struct device *dev = kobj_to_dev(kobj);
12321232
struct usb_interface *intf = to_usb_interface(dev);
12331233
struct ims_pcu *pcu = usb_get_intfdata(intf);
12341234
umode_t mode = attr->mode;

0 commit comments

Comments
 (0)