aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/scan.c
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2014-09-24 14:20:48 -0400
committerOlof Johansson <olof@lixom.net>2014-09-24 14:21:01 -0400
commit28fd837204236cf5b5533525e5b53c5176fa97a3 (patch)
treeac7dcad925950bc0bb53c5a55cb199e31e7aaee0 /drivers/acpi/scan.c
parentc82eb464879dd0ecbe0c4cb1b80ac4e82b634872 (diff)
parent64d14a31d5410ea34641c41795e0ba222bda740c (diff)
Merge tag 'imx-cleanup-3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/cleanup
Merge "ARM: imx: cleanup for 3.18" from Shawn Guo: The i.MX cleanup for 3.18: - Reomve a few i.MX27 and i.MX1 board files - Remove imx_scu_standby_enable() since core code handles scu standby now - Remove unnecessary iomux declaration - Remove useless sound card property from vf610-twr dts * tag 'imx-cleanup-3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: imx: Remove mach-mxt_td60 board file ARM: i.MX: Remove i.MX1 ADS board support ARM: dts: vf610-twr: remove useless property for sound card. ARM: imx: remove imx_scu_standby_enable() ARM: i.MX: Remove Phytec i.MX27 PCM038/PCM970 board files ARM: i.MX: Remove mach-cpuimx27sd board file ARM: imx: iomux: Do not export symbol without public declaration Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'drivers/acpi/scan.c')
-rw-r--r--drivers/acpi/scan.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 0a817ad24f16..9a9298994e26 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -922,12 +922,17 @@ static void acpi_device_notify(acpi_handle handle, u32 event, void *data)
922 device->driver->ops.notify(device, event); 922 device->driver->ops.notify(device, event);
923} 923}
924 924
925static acpi_status acpi_device_notify_fixed(void *data) 925static void acpi_device_notify_fixed(void *data)
926{ 926{
927 struct acpi_device *device = data; 927 struct acpi_device *device = data;
928 928
929 /* Fixed hardware devices have no handles */ 929 /* Fixed hardware devices have no handles */
930 acpi_device_notify(NULL, ACPI_FIXED_HARDWARE_EVENT, device); 930 acpi_device_notify(NULL, ACPI_FIXED_HARDWARE_EVENT, device);
931}
932
933static acpi_status acpi_device_fixed_event(void *data)
934{
935 acpi_os_execute(OSL_NOTIFY_HANDLER, acpi_device_notify_fixed, data);
931 return AE_OK; 936 return AE_OK;
932} 937}
933 938
@@ -938,12 +943,12 @@ static int acpi_device_install_notify_handler(struct acpi_device *device)
938 if (device->device_type == ACPI_BUS_TYPE_POWER_BUTTON) 943 if (device->device_type == ACPI_BUS_TYPE_POWER_BUTTON)
939 status = 944 status =
940 acpi_install_fixed_event_handler(ACPI_EVENT_POWER_BUTTON, 945 acpi_install_fixed_event_handler(ACPI_EVENT_POWER_BUTTON,
941 acpi_device_notify_fixed, 946 acpi_device_fixed_event,
942 device); 947 device);
943 else if (device->device_type == ACPI_BUS_TYPE_SLEEP_BUTTON) 948 else if (device->device_type == ACPI_BUS_TYPE_SLEEP_BUTTON)
944 status = 949 status =
945 acpi_install_fixed_event_handler(ACPI_EVENT_SLEEP_BUTTON, 950 acpi_install_fixed_event_handler(ACPI_EVENT_SLEEP_BUTTON,
946 acpi_device_notify_fixed, 951 acpi_device_fixed_event,
947 device); 952 device);
948 else 953 else
949 status = acpi_install_notify_handler(device->handle, 954 status = acpi_install_notify_handler(device->handle,
@@ -960,10 +965,10 @@ static void acpi_device_remove_notify_handler(struct acpi_device *device)
960{ 965{
961 if (device->device_type == ACPI_BUS_TYPE_POWER_BUTTON) 966 if (device->device_type == ACPI_BUS_TYPE_POWER_BUTTON)
962 acpi_remove_fixed_event_handler(ACPI_EVENT_POWER_BUTTON, 967 acpi_remove_fixed_event_handler(ACPI_EVENT_POWER_BUTTON,
963 acpi_device_notify_fixed); 968 acpi_device_fixed_event);
964 else if (device->device_type == ACPI_BUS_TYPE_SLEEP_BUTTON) 969 else if (device->device_type == ACPI_BUS_TYPE_SLEEP_BUTTON)
965 acpi_remove_fixed_event_handler(ACPI_EVENT_SLEEP_BUTTON, 970 acpi_remove_fixed_event_handler(ACPI_EVENT_SLEEP_BUTTON,
966 acpi_device_notify_fixed); 971 acpi_device_fixed_event);
967 else 972 else
968 acpi_remove_notify_handler(device->handle, ACPI_DEVICE_NOTIFY, 973 acpi_remove_notify_handler(device->handle, ACPI_DEVICE_NOTIFY,
969 acpi_device_notify); 974 acpi_device_notify);
@@ -975,7 +980,7 @@ static int acpi_device_probe(struct device *dev)
975 struct acpi_driver *acpi_drv = to_acpi_driver(dev->driver); 980 struct acpi_driver *acpi_drv = to_acpi_driver(dev->driver);
976 int ret; 981 int ret;
977 982
978 if (acpi_dev->handler) 983 if (acpi_dev->handler && !acpi_is_pnp_device(acpi_dev))
979 return -EINVAL; 984 return -EINVAL;
980 985
981 if (!acpi_drv->ops.add) 986 if (!acpi_drv->ops.add)