diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-02-07 11:30:20 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-02-07 11:30:20 -0500 |
commit | f12b12a8aecfcafcf2f9df1c1658d2484959dfda (patch) | |
tree | bcd252d28a48a6848c2d5c4f6d59010da7b4c76f /drivers/acpi/dock.c | |
parent | ccfef64621ef1e8c7726581b38eb8b98fd2a8afb (diff) | |
parent | 2d29c6a075787f2c1bc49b86a084d2b878f72fc4 (diff) |
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (30 commits)
ACPI: Kconfig text - Fix the ACPI_CONTAINER module name according to the real module name.
eeepc-laptop: fix oops when changing backlight brightness during eeepc-laptop init
ACPICA: Fix table entry truncation calculation
ACPI: Enable bit 11 in _PDC to advertise hw coord
ACPI: struct device - replace bus_id with dev_name(), dev_set_name()
ACPI: add missing KERN_* constants to printks
ACPI: dock: Don't eval _STA on every show_docked sysfs read
ACPI: disable ACPI cleanly when bad RSDP found
ACPI: delete CPU_IDLE=n code
ACPI: cpufreq: Remove deprecated /proc/acpi/processor/../performance proc entries
ACPI: make some IO ports off-limits to AML
ACPICA: add debug dump of BIOS _OSI strings
ACPI: proc_dir_entry 'video/VGA' already registered
ACPI: Skip the first two elements in the _BCL package
ACPI: remove BM_RLD access from idle entry path
ACPI: remove locking from PM1x_STS register reads
eeepc-laptop: use netlink interface
eeepc-laptop: Implement rfkill hotplugging in eeepc-laptop
eeepc-laptop: Check return values from rfkill_register
eeepc-laptop: Add support for extended hotkeys
...
Diffstat (limited to 'drivers/acpi/dock.c')
-rw-r--r-- | drivers/acpi/dock.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c index 5b30b8d91d71..35094f230b1e 100644 --- a/drivers/acpi/dock.c +++ b/drivers/acpi/dock.c | |||
@@ -855,10 +855,14 @@ fdd_out: | |||
855 | static ssize_t show_docked(struct device *dev, | 855 | static ssize_t show_docked(struct device *dev, |
856 | struct device_attribute *attr, char *buf) | 856 | struct device_attribute *attr, char *buf) |
857 | { | 857 | { |
858 | struct acpi_device *tmp; | ||
859 | |||
858 | struct dock_station *dock_station = *((struct dock_station **) | 860 | struct dock_station *dock_station = *((struct dock_station **) |
859 | dev->platform_data); | 861 | dev->platform_data); |
860 | return snprintf(buf, PAGE_SIZE, "%d\n", dock_present(dock_station)); | ||
861 | 862 | ||
863 | if (ACPI_SUCCESS(acpi_bus_get_device(dock_station->handle, &tmp))) | ||
864 | return snprintf(buf, PAGE_SIZE, "1\n"); | ||
865 | return snprintf(buf, PAGE_SIZE, "0\n"); | ||
862 | } | 866 | } |
863 | static DEVICE_ATTR(docked, S_IRUGO, show_docked, NULL); | 867 | static DEVICE_ATTR(docked, S_IRUGO, show_docked, NULL); |
864 | 868 | ||
@@ -984,7 +988,7 @@ static int dock_add(acpi_handle handle) | |||
984 | 988 | ||
985 | ret = device_create_file(&dock_device->dev, &dev_attr_docked); | 989 | ret = device_create_file(&dock_device->dev, &dev_attr_docked); |
986 | if (ret) { | 990 | if (ret) { |
987 | printk("Error %d adding sysfs file\n", ret); | 991 | printk(KERN_ERR "Error %d adding sysfs file\n", ret); |
988 | platform_device_unregister(dock_device); | 992 | platform_device_unregister(dock_device); |
989 | kfree(dock_station); | 993 | kfree(dock_station); |
990 | dock_station = NULL; | 994 | dock_station = NULL; |
@@ -992,7 +996,7 @@ static int dock_add(acpi_handle handle) | |||
992 | } | 996 | } |
993 | ret = device_create_file(&dock_device->dev, &dev_attr_undock); | 997 | ret = device_create_file(&dock_device->dev, &dev_attr_undock); |
994 | if (ret) { | 998 | if (ret) { |
995 | printk("Error %d adding sysfs file\n", ret); | 999 | printk(KERN_ERR "Error %d adding sysfs file\n", ret); |
996 | device_remove_file(&dock_device->dev, &dev_attr_docked); | 1000 | device_remove_file(&dock_device->dev, &dev_attr_docked); |
997 | platform_device_unregister(dock_device); | 1001 | platform_device_unregister(dock_device); |
998 | kfree(dock_station); | 1002 | kfree(dock_station); |
@@ -1001,7 +1005,7 @@ static int dock_add(acpi_handle handle) | |||
1001 | } | 1005 | } |
1002 | ret = device_create_file(&dock_device->dev, &dev_attr_uid); | 1006 | ret = device_create_file(&dock_device->dev, &dev_attr_uid); |
1003 | if (ret) { | 1007 | if (ret) { |
1004 | printk("Error %d adding sysfs file\n", ret); | 1008 | printk(KERN_ERR "Error %d adding sysfs file\n", ret); |
1005 | device_remove_file(&dock_device->dev, &dev_attr_docked); | 1009 | device_remove_file(&dock_device->dev, &dev_attr_docked); |
1006 | device_remove_file(&dock_device->dev, &dev_attr_undock); | 1010 | device_remove_file(&dock_device->dev, &dev_attr_undock); |
1007 | platform_device_unregister(dock_device); | 1011 | platform_device_unregister(dock_device); |
@@ -1011,7 +1015,7 @@ static int dock_add(acpi_handle handle) | |||
1011 | } | 1015 | } |
1012 | ret = device_create_file(&dock_device->dev, &dev_attr_flags); | 1016 | ret = device_create_file(&dock_device->dev, &dev_attr_flags); |
1013 | if (ret) { | 1017 | if (ret) { |
1014 | printk("Error %d adding sysfs file\n", ret); | 1018 | printk(KERN_ERR "Error %d adding sysfs file\n", ret); |
1015 | device_remove_file(&dock_device->dev, &dev_attr_docked); | 1019 | device_remove_file(&dock_device->dev, &dev_attr_docked); |
1016 | device_remove_file(&dock_device->dev, &dev_attr_undock); | 1020 | device_remove_file(&dock_device->dev, &dev_attr_undock); |
1017 | device_remove_file(&dock_device->dev, &dev_attr_uid); | 1021 | device_remove_file(&dock_device->dev, &dev_attr_uid); |