Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

s390/smp: move to use bus_get_dev_root()

Direct access to the struct bus_type dev_root pointer is going away soon
so replace that with a call to bus_get_dev_root() instead, which is what
it is there for.

Cc: Vasily Gorbik <gor@linux.ibm.com>
Cc: Alexander Gordeev <agordeev@linux.ibm.com>
Cc: Christian Borntraeger <borntraeger@linux.ibm.com>
Cc: Sven Schnelle <svens@linux.ibm.com>
Cc: Ilya Leoshkevich <iii@linux.ibm.com>
Cc: linux-s390@vger.kernel.org
Acked-by: Heiko Carstens <hca@linux.ibm.com>
Link: https://lore.kernel.org/r/20230313182918.1312597-19-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

+9 -3
+9 -3
arch/s390/kernel/smp.c
··· 1227 1227 1228 1228 static int __init s390_smp_init(void) 1229 1229 { 1230 + struct device *dev_root; 1230 1231 int cpu, rc = 0; 1231 1232 1232 - rc = device_create_file(cpu_subsys.dev_root, &dev_attr_rescan); 1233 - if (rc) 1234 - return rc; 1233 + dev_root = bus_get_dev_root(&cpu_subsys); 1234 + if (dev_root) { 1235 + rc = device_create_file(dev_root, &dev_attr_rescan); 1236 + put_device(dev_root); 1237 + if (rc) 1238 + return rc; 1239 + } 1240 + 1235 1241 for_each_present_cpu(cpu) { 1236 1242 rc = smp_add_present_cpu(cpu); 1237 1243 if (rc)