diff options
Diffstat (limited to 'drivers/extcon/extcon-class.c')
-rw-r--r-- | drivers/extcon/extcon-class.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/extcon/extcon-class.c b/drivers/extcon/extcon-class.c index 18ccadef43fd..1446152bf2e9 100644 --- a/drivers/extcon/extcon-class.c +++ b/drivers/extcon/extcon-class.c @@ -602,7 +602,8 @@ int extcon_dev_register(struct extcon_dev *edev, struct device *dev) edev->dev->class = extcon_class; edev->dev->release = extcon_dev_release; - dev_set_name(edev->dev, "%s", edev->name ? edev->name : dev_name(dev)); + edev->name = edev->name ? edev->name : dev_name(dev); + dev_set_name(edev->dev, "%s", edev->name); if (edev->max_supported) { char buf[10]; |