aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/core.c
diff options
context:
space:
mode:
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>2018-11-09 09:21:35 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2018-11-26 12:19:11 -0500
commit7847a1455fc4574d53e349d60feb1e1106cdc012 (patch)
treea83039d4fa290580b01760aec3aa48b5f0f8e2ab /drivers/base/core.c
parent07de0e86fe081cd74f5b397af86172d156280d3e (diff)
ACPI / glue: Add acpi_platform_notify() function
Instead of relying on the "platform_notify" callback hook, introducing separate notification function acpi_platform_notify() and calling that directly from drivers core when device entries are added and removed. Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/base/core.c')
-rw-r--r--drivers/base/core.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c
index 3972ef3f080b..260cbdf44f1d 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -8,6 +8,7 @@
8 * Copyright (c) 2006 Novell, Inc. 8 * Copyright (c) 2006 Novell, Inc.
9 */ 9 */
10 10
11#include <linux/acpi.h>
11#include <linux/device.h> 12#include <linux/device.h>
12#include <linux/err.h> 13#include <linux/err.h>
13#include <linux/fwnode.h> 14#include <linux/fwnode.h>
@@ -731,6 +732,12 @@ static inline int device_is_not_partition(struct device *dev)
731static int 732static int
732device_platform_notify(struct device *dev, enum kobject_action action) 733device_platform_notify(struct device *dev, enum kobject_action action)
733{ 734{
735 int ret;
736
737 ret = acpi_platform_notify(dev, action);
738 if (ret)
739 return ret;
740
734 if (platform_notify && action == KOBJ_ADD) 741 if (platform_notify && action == KOBJ_ADD)
735 platform_notify(dev); 742 platform_notify(dev);
736 else if (platform_notify_remove && action == KOBJ_REMOVE) 743 else if (platform_notify_remove && action == KOBJ_REMOVE)