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/topology: 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: linux-s390@vger.kernel.org
Acked-by: Heiko Carstens <hca@linux.ibm.com>
Link: https://lore.kernel.org/r/20230313182918.1312597-18-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

+10 -1
+10 -1
arch/s390/kernel/topology.c
··· 649 649 650 650 static int __init topology_init(void) 651 651 { 652 + struct device *dev_root; 653 + int rc = 0; 654 + 652 655 timer_setup(&topology_timer, topology_timer_fn, TIMER_DEFERRABLE); 653 656 if (MACHINE_HAS_TOPOLOGY) 654 657 set_topology_timer(); 655 658 else 656 659 topology_update_polarization_simple(); 657 660 register_sysctl_table(topology_dir_table); 658 - return device_create_file(cpu_subsys.dev_root, &dev_attr_dispatching); 661 + 662 + dev_root = bus_get_dev_root(&cpu_subsys); 663 + if (dev_root) { 664 + rc = device_create_file(dev_root, &dev_attr_dispatching); 665 + put_device(dev_root); 666 + } 667 + return rc; 659 668 } 660 669 device_initcall(topology_init);