mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
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 <[email protected]> Acked-by: Linus Walleij <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
This commit is contained in:
parent
07de0e86fe
commit
7847a1455f
5 changed files with 30 additions and 10 deletions
|
|
@ -8,6 +8,7 @@
|
|||
* Copyright (c) 2006 Novell, Inc.
|
||||
*/
|
||||
|
||||
#include <linux/acpi.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/fwnode.h>
|
||||
|
|
@ -731,6 +732,12 @@ static inline int device_is_not_partition(struct device *dev)
|
|||
static int
|
||||
device_platform_notify(struct device *dev, enum kobject_action action)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = acpi_platform_notify(dev, action);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (platform_notify && action == KOBJ_ADD)
|
||||
platform_notify(dev);
|
||||
else if (platform_notify_remove && action == KOBJ_REMOVE)
|
||||
|
|
|
|||
Loading…
Reference in a new issue