Merge branch 'pcmcia-next' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/linux

Pull pcmcia update from Dominik Brodowski:
 "Improve the use of the kobj API in the core of the Linux PCMCIA
  subsystem"

* 'pcmcia-next' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/linux:
  pcmcia: Switch to using the new API kobj_to_dev()
This commit is contained in:
Linus Torvalds 2021-02-26 13:54:43 -08:00
commit 360db2b422

View File

@ -1554,7 +1554,7 @@ static ssize_t pccard_show_cis(struct file *filp, struct kobject *kobj,
if (off + count > size) if (off + count > size)
count = size - off; count = size - off;
s = to_socket(container_of(kobj, struct device, kobj)); s = to_socket(kobj_to_dev(kobj));
if (!(s->state & SOCKET_PRESENT)) if (!(s->state & SOCKET_PRESENT))
return -ENODEV; return -ENODEV;
@ -1581,7 +1581,7 @@ static ssize_t pccard_store_cis(struct file *filp, struct kobject *kobj,
if (error) if (error)
return error; return error;
s = to_socket(container_of(kobj, struct device, kobj)); s = to_socket(kobj_to_dev(kobj));
if (off) if (off)
return -EINVAL; return -EINVAL;