Skip to content

Commit e55af76

Browse files
committed
driver core: use device_type->need_parent_lock in device_schedule_reprobe
Stable 7.3.2 moved need_parent_lock from struct bus_type to struct device_type. device_schedule_reprobe() is not in the stable tree and still read dev->bus->need_parent_lock, which broke the build. Signed-off-by: Rudy Andram <rmandrad@gmail.com>
1 parent 4048606 commit e55af76

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎drivers/base/dd.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1551,7 +1551,8 @@ int device_schedule_reprobe(struct device *dev, unsigned int delay_ms)
15511551
* would otherwise drop the last reference before the work runs.
15521552
*/
15531553
rp->parent = get_device(dev->parent);
1554-
rp->parent_lock = dev->parent && dev->bus->need_parent_lock;
1554+
rp->parent_lock = dev->parent && dev->type &&
1555+
dev->type->need_parent_lock;
15551556
rp->drv = READ_ONCE(dev->driver);
15561557
INIT_DELAYED_WORK(&rp->work, device_reprobe_work_fn);
15571558
queue_delayed_work(system_freezable_wq, &rp->work,

0 commit comments

Comments
 (0)