From b9f73067f32531db608e469a9ad20ce631e34550 Mon Sep 17 00:00:00 2001 From: Zhang Rui Date: Tue, 14 Jan 2014 16:46:38 +0800 Subject: platform: introduce OF style 'modalias' support for platform bus Fix a problem that, the platform bus supports the OF style modalias in .uevent() call, but not in its device 'modalias' sysfs attribute. Signed-off-by: Zhang Rui Acked-by: Rob Herring Signed-off-by: Rafael J. Wysocki --- drivers/base/platform.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers/base/platform.c') diff --git a/drivers/base/platform.c b/drivers/base/platform.c index 2f4aea2428b2..bc78848dd59a 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c @@ -679,6 +679,10 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *a, struct platform_device *pdev = to_platform_device(dev); int len; + len = of_device_get_modalias(dev, buf, PAGE_SIZE -1); + if (len != -ENODEV) + return len; + len = acpi_device_modalias(dev, buf, PAGE_SIZE -1); if (len != -ENODEV) return len; -- cgit