@@ -397,13 +397,12 @@ bool device_is_bound(struct device *dev)
397
397
static void driver_bound (struct device * dev )
398
398
{
399
399
if (device_is_bound (dev )) {
400
- pr_warn ("%s: device %s already bound\n" ,
401
- __func__ , kobject_name (& dev -> kobj ));
400
+ dev_warn (dev , "%s: device already bound\n" , __func__ );
402
401
return ;
403
402
}
404
403
405
- pr_debug ( "driver: '%s': %s: bound to device '%s' \n" , dev -> driver -> name ,
406
- __func__ , dev_name ( dev ) );
404
+ dev_dbg ( dev , "driver: '%s': %s: bound to device\n" , dev -> driver -> name ,
405
+ __func__ );
407
406
408
407
klist_add_tail (& dev -> p -> knode_driver , & dev -> driver -> p -> klist_devices );
409
408
device_links_driver_bound (dev );
@@ -587,8 +586,8 @@ static int call_driver_probe(struct device *dev, struct device_driver *drv)
587
586
break ;
588
587
case - ENODEV :
589
588
case - ENXIO :
590
- pr_debug ( "%s: probe of %s rejects match %d\n" ,
591
- drv -> name , dev_name ( dev ) , ret );
589
+ dev_dbg ( dev , " probe with driver %s rejects match %d\n" ,
590
+ drv -> name , ret );
592
591
break ;
593
592
default :
594
593
/* driver matched but the probe failed */
@@ -620,8 +619,8 @@ static int really_probe(struct device *dev, struct device_driver *drv)
620
619
if (link_ret == - EPROBE_DEFER )
621
620
return link_ret ;
622
621
623
- pr_debug ( "bus: '%s': %s: probing driver %s with device %s \n" ,
624
- drv -> bus -> name , __func__ , drv -> name , dev_name ( dev ) );
622
+ dev_dbg ( dev , "bus: '%s': %s: probing driver %s with device\n" ,
623
+ drv -> bus -> name , __func__ , drv -> name );
625
624
if (!list_empty (& dev -> devres_head )) {
626
625
dev_crit (dev , "Resources present before probing\n" );
627
626
ret = - EBUSY ;
@@ -644,8 +643,7 @@ static int really_probe(struct device *dev, struct device_driver *drv)
644
643
645
644
ret = driver_sysfs_add (dev );
646
645
if (ret ) {
647
- pr_err ("%s: driver_sysfs_add(%s) failed\n" ,
648
- __func__ , dev_name (dev ));
646
+ dev_err (dev , "%s: driver_sysfs_add failed\n" , __func__ );
649
647
goto sysfs_failed ;
650
648
}
651
649
@@ -706,8 +704,8 @@ static int really_probe(struct device *dev, struct device_driver *drv)
706
704
dev -> pm_domain -> sync (dev );
707
705
708
706
driver_bound (dev );
709
- pr_debug ( "bus: '%s': %s: bound device %s to driver %s\n" ,
710
- drv -> bus -> name , __func__ , dev_name ( dev ) , drv -> name );
707
+ dev_dbg ( dev , "bus: '%s': %s: bound device to driver %s\n" ,
708
+ drv -> bus -> name , __func__ , drv -> name );
711
709
goto done ;
712
710
713
711
dev_sysfs_state_synced_failed :
@@ -786,8 +784,8 @@ static int __driver_probe_device(struct device_driver *drv, struct device *dev)
786
784
return - EBUSY ;
787
785
788
786
dev -> can_match = true;
789
- pr_debug ( "bus: '%s': %s: matched device %s with driver %s\n" ,
790
- drv -> bus -> name , __func__ , dev_name ( dev ) , drv -> name );
787
+ dev_dbg ( dev , "bus: '%s': %s: matched device with driver %s\n" ,
788
+ drv -> bus -> name , __func__ , drv -> name );
791
789
792
790
pm_runtime_get_suppliers (dev );
793
791
if (dev -> parent )
0 commit comments