diff options
author | Leonardo Arena <rnalrd@alpinelinux.org> | 2014-06-18 12:39:55 +0000 |
---|---|---|
committer | Leonardo Arena <rnalrd@alpinelinux.org> | 2014-06-18 12:39:55 +0000 |
commit | 4b9bdd091433922a764989985def78f4a312993a (patch) | |
tree | ca02316d686f26ea5476e8feb8721ee0d97b237d /main/linux-grsec | |
parent | 11947fab000ee4ba99050410d9857293ec162c50 (diff) | |
download | aports-4b9bdd091433922a764989985def78f4a312993a.tar.bz2 aports-4b9bdd091433922a764989985def78f4a312993a.tar.xz |
main/linux-virt-grsec: upgrade to 3.14.6
Diffstat (limited to 'main/linux-grsec')
-rw-r--r-- | main/linux-grsec/platform-introduce-OF-style-modalias-support-for-pla.patch | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/main/linux-grsec/platform-introduce-OF-style-modalias-support-for-pla.patch b/main/linux-grsec/platform-introduce-OF-style-modalias-support-for-pla.patch deleted file mode 100644 index b115d52a6f..0000000000 --- a/main/linux-grsec/platform-introduce-OF-style-modalias-support-for-pla.patch +++ /dev/null @@ -1,66 +0,0 @@ -From b9f73067f32531db608e469a9ad20ce631e34550 Mon Sep 17 00:00:00 2001 -From: Zhang Rui <rui.zhang@intel.com> -Date: Tue, 14 Jan 2014 16:46:38 +0800 -Subject: [PATCH 1/1] 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 <rui.zhang@intel.com> -Acked-by: Rob Herring <robh@kernel.org> -Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> ---- - drivers/base/platform.c | 4 ++++ - drivers/of/device.c | 3 +++ - include/linux/of_device.h | 6 ++++++ - 3 files changed, 13 insertions(+) - -diff --git a/drivers/of/device.c b/drivers/of/device.c -index f685e55..dafb973 100644 ---- a/drivers/of/device.c -+++ b/drivers/of/device.c -@@ -85,6 +85,9 @@ ssize_t of_device_get_modalias(struct device *dev, char *str, ssize_t len) - int cplen, i; - ssize_t tsize, csize, repend; - -+ if ((!dev) || (!dev->of_node)) -+ return -ENODEV; -+ - /* Name & Type */ - csize = snprintf(str, len, "of:N%sT%s", dev->of_node->name, - dev->of_node->type); -diff --git a/include/linux/of_device.h b/include/linux/of_device.h -index 82ce324..8d7dd67 100644 ---- a/include/linux/of_device.h -+++ b/include/linux/of_device.h -@@ -64,6 +64,12 @@ static inline int of_driver_match_device(struct device *dev, - static inline void of_device_uevent(struct device *dev, - struct kobj_uevent_env *env) { } - -+static inline int of_device_get_modalias(struct device *dev, -+ char *str, ssize_t len) -+{ -+ return -ENODEV; -+} -+ - static inline int of_device_uevent_modalias(struct device *dev, - struct kobj_uevent_env *env) - { ---- a/drivers/base/platform.c -+++ b/drivers/base/platform.c -@@ -677,7 +677,13 @@ - char *buf) - { - struct platform_device *pdev = to_platform_device(dev); -- int len = snprintf(buf, PAGE_SIZE, "platform:%s\n", pdev->name); -+ int len; -+ -+ len = of_device_get_modalias(dev, buf, PAGE_SIZE -1); -+ if (len != -ENODEV) -+ return len; -+ -+ len = snprintf(buf, PAGE_SIZE, "platform:%s\n", pdev->name); - - return (len >= PAGE_SIZE) ? (PAGE_SIZE - 1) : len; - } |