diff options
Diffstat (limited to 'net/rfkill')
-rw-r--r-- | net/rfkill/rfkill.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/rfkill/rfkill.c b/net/rfkill/rfkill.c index 69f3a3b4dd61..ec26eae8004d 100644 --- a/net/rfkill/rfkill.c +++ b/net/rfkill/rfkill.c | |||
@@ -774,7 +774,7 @@ static void rfkill_led_trigger_register(struct rfkill *rfkill) | |||
774 | int error; | 774 | int error; |
775 | 775 | ||
776 | if (!rfkill->led_trigger.name) | 776 | if (!rfkill->led_trigger.name) |
777 | rfkill->led_trigger.name = rfkill->dev.bus_id; | 777 | rfkill->led_trigger.name = dev_name(&rfkill->dev); |
778 | if (!rfkill->led_trigger.activate) | 778 | if (!rfkill->led_trigger.activate) |
779 | rfkill->led_trigger.activate = rfkill_led_trigger_activate; | 779 | rfkill->led_trigger.activate = rfkill_led_trigger_activate; |
780 | error = led_trigger_register(&rfkill->led_trigger); | 780 | error = led_trigger_register(&rfkill->led_trigger); |
@@ -815,8 +815,7 @@ int __must_check rfkill_register(struct rfkill *rfkill) | |||
815 | "badly initialized rfkill struct\n")) | 815 | "badly initialized rfkill struct\n")) |
816 | return -EINVAL; | 816 | return -EINVAL; |
817 | 817 | ||
818 | snprintf(dev->bus_id, sizeof(dev->bus_id), | 818 | dev_set_name(dev, "rfkill%ld", (long)atomic_inc_return(&rfkill_no) - 1); |
819 | "rfkill%ld", (long)atomic_inc_return(&rfkill_no) - 1); | ||
820 | 819 | ||
821 | rfkill_led_trigger_register(rfkill); | 820 | rfkill_led_trigger_register(rfkill); |
822 | 821 | ||