diff options
author | Zhang Rui <rui.zhang@intel.com> | 2007-01-11 02:09:09 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2007-02-03 01:14:56 -0500 |
commit | 547352660506ab99d6b0bad58dea495bf3718cee (patch) | |
tree | 2fdfca6c709015fd1266b9bb44f1bfba50f5e069 /drivers/acpi/bay.c | |
parent | 975a8e3ed2b9eab9f062a1e0ba7fe180e15204e1 (diff) |
ACPI: bay: Convert ACPI Bay driver to be compatible with sysfs update.
Set fake hid for ejectable drive bay.
Match bay devices by checking the hid.
Remove .match method of Bay driver.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/bay.c')
-rw-r--r-- | drivers/acpi/bay.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/drivers/acpi/bay.c b/drivers/acpi/bay.c index aa1b131c0fce..667fa1dfa1a3 100644 --- a/drivers/acpi/bay.c +++ b/drivers/acpi/bay.c | |||
@@ -49,16 +49,14 @@ MODULE_LICENSE("GPL"); | |||
49 | static void bay_notify(acpi_handle handle, u32 event, void *data); | 49 | static void bay_notify(acpi_handle handle, u32 event, void *data); |
50 | static int acpi_bay_add(struct acpi_device *device); | 50 | static int acpi_bay_add(struct acpi_device *device); |
51 | static int acpi_bay_remove(struct acpi_device *device, int type); | 51 | static int acpi_bay_remove(struct acpi_device *device, int type); |
52 | static int acpi_bay_match(struct acpi_device *device, | ||
53 | struct acpi_driver *driver); | ||
54 | 52 | ||
55 | static struct acpi_driver acpi_bay_driver = { | 53 | static struct acpi_driver acpi_bay_driver = { |
56 | .name = ACPI_BAY_DRIVER_NAME, | 54 | .name = ACPI_BAY_DRIVER_NAME, |
57 | .class = ACPI_BAY_CLASS, | 55 | .class = ACPI_BAY_CLASS, |
56 | .ids = ACPI_BAY_HID, | ||
58 | .ops = { | 57 | .ops = { |
59 | .add = acpi_bay_add, | 58 | .add = acpi_bay_add, |
60 | .remove = acpi_bay_remove, | 59 | .remove = acpi_bay_remove, |
61 | .match = acpi_bay_match, | ||
62 | }, | 60 | }, |
63 | }; | 61 | }; |
64 | 62 | ||
@@ -347,20 +345,6 @@ static int acpi_bay_remove(struct acpi_device *device, int type) | |||
347 | return 0; | 345 | return 0; |
348 | } | 346 | } |
349 | 347 | ||
350 | static int acpi_bay_match(struct acpi_device *device, | ||
351 | struct acpi_driver *driver) | ||
352 | { | ||
353 | if (!device || !driver) | ||
354 | return -EINVAL; | ||
355 | |||
356 | if (is_ejectable_bay(device->handle)) { | ||
357 | bay_dprintk(device->handle, "matching bay device"); | ||
358 | return 0; | ||
359 | } | ||
360 | |||
361 | return -ENODEV; | ||
362 | } | ||
363 | |||
364 | /** | 348 | /** |
365 | * bay_create_acpi_device - add new devices to acpi | 349 | * bay_create_acpi_device - add new devices to acpi |
366 | * @handle - handle of the device to add | 350 | * @handle - handle of the device to add |