diff options
author | Tian Tao <tiantao6@hisilicon.com> | 2021-01-04 02:59:30 +0100 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2021-01-04 08:16:00 +0100 |
commit | 4ce6b242b78d355ba899f1b16c6bfcd43df155a0 (patch) | |
tree | 2940859cf03d89a20aac013edb8c9e09ac1ae193 /drivers/pcmcia | |
parent | Linux 5.11-rc2 (diff) | |
download | linux-4ce6b242b78d355ba899f1b16c6bfcd43df155a0.tar.xz linux-4ce6b242b78d355ba899f1b16c6bfcd43df155a0.zip |
pcmcia: Switch to using the new API kobj_to_dev()
fixed the following coccicheck:
drivers/pcmcia/cistpl.c:1557:54-55: WARNING opportunity for kobj_to_dev()
drivers/pcmcia/cistpl.c:1584:53-54: WARNING opportunity for kobj_to_dev()
Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r-- | drivers/pcmcia/cistpl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pcmcia/cistpl.c b/drivers/pcmcia/cistpl.c index cf109d9a1112..e6939103991b 100644 --- a/drivers/pcmcia/cistpl.c +++ b/drivers/pcmcia/cistpl.c @@ -1554,7 +1554,7 @@ static ssize_t pccard_show_cis(struct file *filp, struct kobject *kobj, if (off + count > size) count = size - off; - s = to_socket(container_of(kobj, struct device, kobj)); + s = to_socket(kobj_to_dev(kobj)); if (!(s->state & SOCKET_PRESENT)) return -ENODEV; @@ -1581,7 +1581,7 @@ static ssize_t pccard_store_cis(struct file *filp, struct kobject *kobj, if (error) return error; - s = to_socket(container_of(kobj, struct device, kobj)); + s = to_socket(kobj_to_dev(kobj)); if (off) return -EINVAL; |