diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-04-29 19:49:21 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-04-29 19:49:21 +0200 |
commit | 391c0325cc5f9e2daf9117825714d777b3595a42 (patch) | |
tree | a9ddd5998b1bdf0d57d1f7258d28e11edf11e3c7 /drivers/base | |
parent | bc0c60457c35c895b5591f85046b1f13da5487c4 (diff) | |
download | blackbird-op-linux-391c0325cc5f9e2daf9117825714d777b3595a42.tar.gz blackbird-op-linux-391c0325cc5f9e2daf9117825714d777b3595a42.zip |
Revert "driver core: platform: Fix the usage of platform device name(pdev->name)"
This reverts commit edb16da34b084c66763f29bee42b4e6bb33c3d66 as it
breaks existing systems as reported by Krzysztof.
Reported-by: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Venkata Narendra Kumar Gutta <vnkgutta@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/platform.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/base/platform.c b/drivers/base/platform.c index df76e40c1a83..4d1729853d1a 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c @@ -890,7 +890,7 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *a, if (len != -ENODEV) return len; - len = snprintf(buf, PAGE_SIZE, "platform:%s\n", dev_name(&pdev->dev)); + len = snprintf(buf, PAGE_SIZE, "platform:%s\n", pdev->name); return (len >= PAGE_SIZE) ? (PAGE_SIZE - 1) : len; } @@ -966,7 +966,7 @@ static int platform_uevent(struct device *dev, struct kobj_uevent_env *env) return rc; add_uevent_var(env, "MODALIAS=%s%s", PLATFORM_MODULE_PREFIX, - dev_name(&pdev->dev)); + pdev->name); return 0; } @@ -975,7 +975,7 @@ static const struct platform_device_id *platform_match_id( struct platform_device *pdev) { while (id->name[0]) { - if (strcmp(dev_name(&pdev->dev), id->name) == 0) { + if (strcmp(pdev->name, id->name) == 0) { pdev->id_entry = id; return id; } @@ -1019,7 +1019,7 @@ static int platform_match(struct device *dev, struct device_driver *drv) return platform_match_id(pdrv->id_table, pdev) != NULL; /* fall-back to driver name match */ - return (strcmp(dev_name(&pdev->dev), drv->name) == 0); + return (strcmp(pdev->name, drv->name) == 0); } #ifdef CONFIG_PM_SLEEP |