summaryrefslogtreecommitdiffstats
path: root/drivers/platform
Commit message (Collapse)AuthorAgeFilesLines
* intel_scu_ipc: fix IPC i2c write bugJianwei Yang2010-08-241-1/+1
| | | | | | | | We should pass the data to the data register. Signed-off-by: Jianwei Yang <jianwei.yang@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* rar: Fix off by one errorOssama Othman2010-08-241-1/+1
| | | | | | | | It looks like there is an off-by-one error in one of your changes to drivers/staging/rar_register/rar_register.c: Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* hp-wmi: Fix query interfaceMatthew Garrett2010-08-231-39/+25
| | | | | | | | The machines I have appear to provide their return value in the arguments structure, not the output structure. Rework the driver to use that again in order to get rfkill working again. Signed-off-by: Matthew Garrett <mjg@redhat.com>
* ACPI_TOSHIBA needs LEDS supportJonathan Corbet2010-08-231-1/+3
| | | | | | | | | | | | | | | | | | | | | Don't ask how ACPI_TOSHIBA got enabled on in desktop system's .config - I don't know. But it has silently been there until I tried 2.6.36-rc2, where it broke the build because I don't have LED support turned on. Attached patch fixes things up. (I had to change BACKLIGHT_CLASS_DEVICE to "depends" because otherwise I get unsightly core dumps out of scripts/kconfig/conf). jon -- toshiba: make sure we pull in LED support The Toshiba extras driver uses the LED module, so make sure we have it configure in. Signed-off-by: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* platform/x86: move rfkill for Dell Mini 1012 to compal-laptopVictor van den Elzen2010-08-162-0/+16
| | | | | | | | | Like others in the Mini series, the Dell Mini 1012 does not support the smbios hook required by dell-laptop. Signed-off-by: Victor van den Elzen <victor.vde@gmail.com> Cc: stable <stable@kernel.org> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* thinkpad-acpi: Add KEY_CAMERA (Fn-F6) for Lenovo keyboardsJens Taprogge2010-08-161-1/+1
| | | | | | | | | | On the T410s and most likely other current models, Fn-F6 is labeled as Camera/Headphone key. Report key presses as KEY_CAMERA. Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org> Acked-by: Jerone Young <jerone.young@canonical.com> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* thinkpad-acpi: add support for model-specific keymapsHenrique de Moraes Holschuh2010-08-161-18/+42
| | | | | | | | | | | Use the quirks engine to select model-specific keymaps, which makes it much easier to extend should we need it. Keycodes are based on the tables at http://www.thinkwiki.org/wiki/Default_meanings_of_special_keys. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* thinkpad-acpi: lock down size of hotkey keymapHenrique de Moraes Holschuh2010-08-161-4/+15
| | | | | | | | | Use a safer coding style for the hotkey keymap. This does not fix any problems, as the current code is correct. But it might help avoid mistakes in the future. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* thinkpad-acpi: untangle ACPI/vendor backlight selectionHenrique de Moraes Holschuh2010-08-161-22/+20
| | | | | | | | | | | | acpi_video_backlight_support() already tells us if ACPI is handling backlight control through the generic ACPI handle. It is better to just trust it. While at it, adjust down a printk priority, and test earlier for brightness_enable=0. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* thinkpad-acpi: find ACPI video device by synthetic HIDHenrique de Moraes Holschuh2010-08-161-40/+12
| | | | | | | | | | | | | | | | | | | The Linux ACPI core locates the ACPI video devices for us and marks them with ACPI_VIDEO_HID. Use that information to locate the video device instead of a half-baked hunt for _BCL. This uncouples the detection of the number of backlight brightness levels on ThinkPads from the ACPI paths in vid_handle. With this change, the driver should be able to always detect whether the ThinkPad uses a 8-level or 16-level brightness scale even on newer models for which the vid_handle paths have not been updated yet. It will skip deactivated devices in the ACPI device tree, which is a change in behaviour. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* intel_ips: potential null dereferenceDan Carpenter2010-08-161-1/+3
| | | | | | | | | There is a potential NULL dereference of "limits." We can just return NULL earlier to avoid it. The caller already handles NULL returns. Signed-off-by: Dan Carpenter <error27@gmail.com> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* drivers/platform/x86: Adjust confusing if indentationJulia Lawall2010-08-161-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The assignment of ret to -EIO appears to only make sense if the branch that it is aligned with is executed, so move it into that branch. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r disable braces4@ position p1,p2; statement S1,S2; @@ ( if (...) { ... } | if (...) S1@p1 S2@p2 ) @script:python@ p1 << r.p1; p2 << r.p2; @@ if (p1[0].column == p2[0].column): cocci.print_main("branch",p1) cocci.print_secs("after",p2) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* x86: intel_ips: do not use PCI resources before pci_enable_device()Kulikov Vasiliy2010-08-161-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | IRQ and resource[] may not have correct values until after PCI hotplug setup occurs at pci_enable_device() time. The semantic match that finds this problem is as follows: // <smpl> @@ identifier x; identifier request ~= "pci_request.*|pci_resource.*"; @@ ( * x->irq | * x->resource | * request(x, ...) ) ... *pci_enable_device(x) // </smpl> Signed-off-by: Kulikov Vasiliy <segooon@gmail.com> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* ideapad: Only allow camera state to be set to 0 or 1David Woodhouse2010-08-111-1/+1
| | | | Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* ideapad: Stop using global variablesDavid Woodhouse2010-08-111-34/+58
| | | | Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* Add Lenovo ideapad driverDavid Woodhouse2010-08-113-0/+290
| | | | Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* ips driver: make it less chattyJesse Barnes2010-08-031-2/+2
| | | | | | | | | We don't need a dev_warn when we exceed a thermal or power limit as we'll handle it appropriately by clamping down on the CPU, GPU or both as needed. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* intel_scu_ipc: fix size field for intel_scu_ipc_commandHong Liu2010-08-031-1/+1
| | | | | | | | | Size for PMIC read/write command is byte, while it is DWORD for other IPC commands. Signed-off-by: Hong Liu <hong.liu@intel.com> Signed-off-by: ALan Cox <alan@linux.intel.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* intel_scu_ipc: return -EIO for error condition in busy_loopHong Liu2010-08-031-1/+4
| | | | | | Signed-off-by: Hong Liu <hong.liu@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* intel_scu_ipc: fix data packing of PMIC command on MoorestownHong Liu2010-08-031-5/+6
| | | | | | | | Data is 2-byte per entry for PMIC read-modify-update command. Signed-off-by: Hong Liu <hong.liu@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* Clean up command packing on MRST.Andy Ross2010-08-031-18/+11
| | | | | | | | Don't pass more bytes in the command length field than we filled. Signed-off-by: Andy Ross <andy.ross@windriver.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* zero the stack buffer before giving random garbage to the SCUArjan van de Ven2010-08-031-0/+2
| | | | | | | | | some messages take 4 bytes, but only fill 3 bytes.... this patch makes sure that whatever we send to the SCU is zeroed first Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* Fix stack buffer size for IPC writev messagesArjan van de Ven2010-08-031-2/+2
| | | | | | | | | | | | The stack buffer for IPC messages was 16 bytes, limiting messages to a size of 4 (each message is 32 bit). However, the touch screen driver is trying to send messages of size 5.... (AC: Set to 20 bytes having checked the max size allowed) Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* intel_scu_ipc: Use the new cpu identification functionAlan Cox2010-08-031-12/+5
| | | | | | | | This provides an architecture level board identify function to replace the cpuid direct usage Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* intel_scu_ipc: tidy up unused bitsSreedhara DS2010-08-031-4/+0
| | | | | | | | | Delete unused constants IPC_CMD_INDIRECT_RD and IPC_CMD_INDIRECT_WR Remove multiple inclusion of header file "asm/mrst.h" Signed-off-by: Sreedhara DS <sreedhara.ds@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* Remove indirect read write api support.Sreedhara DS2010-08-031-82/+0
| | | | | | | | | The firmware of production devices does not support this interface so this is dead code. Signed-off-by: Sreedhara DS <sreedhara.ds@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* intel_scu_ipc: Support Medfield processorsSreedhara DS2010-08-031-20/+33
| | | | | | | | | | Changes to work on bothMmoorestown and Medfield New pci id added for Medfield Return type of ipc_data_readl chnaged from u8 to u32 Signed-off-by: Sreedhara DS <sreedhara.ds@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* intel_scu_ipc: detect CPU type automaticallySreedhara DS2010-08-031-7/+12
| | | | | | | | Intel SCU message formats depend upon the processor type. Replace the module option with automatic detection of the processor type. Signed-off-by: Sreedhara DS <sreedhara.ds@intel.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* x86 plat: limit x86 platform driver menu to X86Jan Engelhardt2010-08-031-0/+1
| | | | | | | | My .config contains ACER_WMI=m. On SPARC. That does not make sense. Restrict the x86 platform driver menu to x86. Signed-off-by: Jan Engelhardt <jengelh@medozas.de> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* hp-wmi: acpi_drivers.h is already included through acpi.h two lines belowThomas Renninger2010-08-031-1/+0
| | | | | | | | Signed-off-by: Thomas Renninger <trenn@suse.de> CC: linux-acpi@vger.kernel.or CC: platform-driver-x86@vger.kernel.org CC: mjg@redhat.com Signed-off-by: Matthew Garrett <mjg@redhat.com>
* hp-wmi: Fix mixing up of and/or directiveThomas Renninger2010-08-031-1/+3
| | | | | | | | | | | This should have been an "and". Additionally checking for !obj is even better. Signed-off-by: Thomas Renninger <trenn@suse.de> CC: linux-acpi@vger.kernel.or CC: platform-driver-x86@vger.kernel.org CC: mjg@redhat.com Signed-off-by: Matthew Garrett <mjg@redhat.com>
* dell-laptop: make dell_laptop_i8042_filter() staticAxel Lin2010-08-031-1/+1
| | | | | | | Make dell_laptop_i8042_filter() static as it's used only in dell-laptop.c Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* asus-laptop: fix asus_input_init error pathAxel Lin2010-08-031-5/+5
| | | | | | | | | | This patch includes below fixes: 1. return -ENOMEM instead of 0 if input_allocate_device fail. 2. fix wrong goto if sparse_keymap_setup fail. 3. fix wrong goto if input_register_device fail. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* msi-wmi: make needlessly global symbols staticAxel Lin2010-08-031-1/+1
| | | | | | | | | backlight is needlessly defined global. This patch makes the symbol static. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Anisse Astier <anisse@astier.eu> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* toshiba-acpi: Add support for Toshiba Illumination.Pierre Ducroquet2010-08-031-0/+117
| | | | | | | | | | Add support for Toshiba Illumination. This is a set of LEDs installed on some Toshiba laptops. It is controlled through ACPI, the commands has been found through reverse engineering. It has been tested on a Toshiba Qosmio G50-122. Signed-off-by: Pierre Ducroquet <pinaraf@pinaraf.info> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* compal-laptop: depends on POWER_SUPPLYRandy Dunlap2010-08-031-0/+1
| | | | | | | | | | | | | | compal-laptop uses power_supply interfaces so it should depend on POWER_SUPPLY. ERROR: "power_supply_register" [drivers/platform/x86/compal-laptop.ko] undefined! ERROR: "power_supply_unregister" [drivers/platform/x86/compal-laptop.ko] undefined! Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: Cezary Jackiewicz <cezary.jackiewicz@gmail.com> Cc: Matthew Garrett <mjg@redhat.com> Cc: platform-driver-x86@vger.kernel.org Signed-off-by: Matthew Garrett <mjg@redhat.com>
* gpio: Add PMIC GPIO block supportAlek Du2010-08-033-0/+349
| | | | | | | | | | | | | | Moorestown has PMIC chip which contains GPIO blocks. The PMIC chip is connected to Langwell by SPI interface. So this GPIO driver will be regarded as SPI GPIO expander though the actual GPIO access is through IPC and SRAM. The SPI master contoller will probe this device driver by parsing SPIB table. Cleaned up for new IPC, GPE removed and some printk and other tidying by Alan Cox. Fixes for points noted by Matthew Garrett Signed-off-by: Alek Du <alek.du@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* X86 platform driver: Fix section mismatch in wmi.cThomas Renninger2010-08-031-2/+2
| | | | | | | | | | | | | The .add function must not be declared __init. Signed-off-by: Thomas Renninger <trenn@suse.de> CC: Alexey Starikovskiy <astarikovskiy@suse.de> CC: Len Brown <lenb@kernel.org> CC: linux-kernel@vger.kernel.org CC: linux-acpi@vger.kernel.org CC: platform-driver-x86@vger.kernel.org Signed-off-by: Matthew Garrett <mjg@redhat.com>
* X86 platform drivers: Remove EC dump from thinkpad_acpiThomas Renninger2010-08-031-73/+0
| | | | | | | | | | | | | | | | | There is a general interface for that now (provided by other patches in this patch series): /sys/kernel/debug/ec/*/io Signed-off-by: Thomas Renninger <trenn@suse.de> CC: Alexey Starikovskiy <astarikovskiy@suse.de> CC: Len Brown <lenb@kernel.org> CC: linux-kernel@vger.kernel.org CC: linux-acpi@vger.kernel.org CC: platform-driver-x86@vger.kernel.org CC: Henrique de Moraes Holschuh <hmh@hmh.eng.br> CC: ibm-acpi-devel@lists.sourceforge.net Signed-off-by: Matthew Garrett <mjg@redhat.com>
* panasonic-laptop: fix acpi_pcc_write_sset return valueAxel Lin2010-08-031-5/+2
| | | | | | | | | | | | | In current implementation, acpi_pcc_write_sset return 1 if write is successful, 0 if write is failed. But all the callers consider acpi_pcc_write_sset return 0 if write is successful and return negtive if write is failed. This patch changes the implementation of acpi_pcc_write_sset to return 0 if write is successful, -EIO if write is failed. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* eeepc-laptop: fix hotplug_disabled module_param permissionsAxel Lin2010-08-031-1/+1
| | | | | | | | | | | | | The hotplug_disabled module parameter is determinated at the module load time. Change the value after the module is loaded does not make sense and has no effect at all, thus set the permissions to 0444 instead of 0644. Signed-off-by: Axel Lin <axel.lin@gmail.com> Cc: Corentin Chary <corentincj@iksaif.net> Cc: Matthew Garrett <mjg@redhat.com> Cc: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* asus-laptop: fix wapf, wlan_status and bluetooth_status module_param permissionsAxel Lin2010-08-031-3/+3
| | | | | | | | | | | | | | | | | The wapf module parameters defines the behavior of the Fn+Fx wlan key. The wlan_status and bluetooth_status module parameters are for setting the wlan/bluetooth status on boot. All above module parameters are determinated only at the module load time. Change the value after the module is loaded does not make sense and has no effect at all, thus set the permissions to 0444 instead of 0644. Signed-off-by: Axel Lin <axel.lin@gmail.com> Cc: Corentin Chary <corentincj@iksaif.net> Cc: Matthew Garrett <mjg@redhat.com> Cc: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* acer-wmi: remove non-used acer_quirks struct definitionAxel Lin2010-08-031-11/+0
| | | | | | | | | | | | Remove non-used acer_quirks struct definition. Signed-off-by: Axel Lin <axel.lin@gmail.com> Cc: Carlos Corbacho <carlos@strangeworlds.co.uk> Cc: Matthew Garrett <mjg@redhat.com> Cc: Thomas Renninger <trenn@suse.de> Cc: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* acer-wmi: fix memory leaks in wmab_execute error pathAxel Lin2010-08-031-8/+16
| | | | | | | | | | | | | | | | | | | | | | When acpi_evaluate_object() is passed ACPI_ALLOCATE_BUFFER, the caller must kfree the returned buffer if AE_OK is returned. Call Trace: wmab_execute -> wmi_evaluate_method -> acpi_evaluate_object Thus if callers of wmab_execute() pass ACPI_ALLOCATE_BUFFER, the return buffer must be kfreed if wmab_execute return AE_OK. [akpm@linux-foundation.org: avoid multiple return points, remove unneeded cast, remove unneeded initialisation of `status'] Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Carlos Corbacho <carlos@strangeworlds.co.uk> Cc: Matthew Garrett <mjg@redhat.com> Cc: Thomas Renninger <trenn@suse.de> Cc: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* acer-wmi: fix memory leaks in WMID_set_capabilities and get_wmid_devicesAxel Lin2010-08-031-3/+7
| | | | | | | | | | | | | | | | | When acpi_evaluate_object() is passed ACPI_ALLOCATE_BUFFER, the caller must kfree the returned buffer if AE_OK is returned. The callers of wmi_query_block() pass ACPI_ALLOCATE_BUFFER, and thus must check its return value before accessing or kfree() on the buffer. This patch adds a missing kfree(out.pointer) before exit WMID_set_capabilities() and get_wmid_devices(). Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Carlos Corbacho <carlos@strangeworlds.co.uk> Cc: Matthew Garrett <mjg@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* toshiba_acpi: rename add_device() and remove_device() to ↵Axel Lin2010-08-031-4/+4
| | | | | | | | | | | | | | create_toshiba_proc_entries() and remove_toshiba_proc_entries() To improve readability rename add_device() to create_toshiba_proc_entries() and rename remove_device() to remove_toshiba_proc_entries(). Signed-off-by: Axel Lin <axel.lin@gmail.com> Cc: Matthew Garrett <mjg@redhat.com> Cc: Márton Németh <nm127@freemail.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* hp-wmi: add return value checking for input_allocate_device()Axel Lin2010-08-031-0/+2
| | | | | | | | | | Add error checking and return -ENOMEM if input_allocate_device() fail. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Thomas Renninger <trenn@suse.de> Cc: Matthew Garrett <mjg@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* toshiba_acpi: make remove_device() and add_device() voidAxel Lin2010-08-031-11/+3
| | | | | | | | | | | | | | | | | | remove_device() and add_device() are not related to ACPI APIs, it does not make sense to return acpi_status for both functions. Current implementation of add_device() always AE_OK, thus the return value checking for add_device() always return false for ACPI_FAILURE(status). This patch makes add_device() to be void and remove the unnecessary return value checking. remove_proc_entry() won't fail, thus change remove_device() to be void. Signed-off-by: Axel Lin <axel.lin@gmail.com> Cc: Matthew Garrett <mjg@redhat.com> Cc: Márton Németh <nm127@freemail.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* acerhdf: fix resource reclaim in error pathAxel Lin2010-08-031-7/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix resource reclaim in below cases: 1. acerhdf_register_platform() does not properly handle platform_device_alloc() failure and platform_device_add() failure This patch adds error handing for acerhdf_register_platform(). 2. acerhdf_register_platform() return err with acerhdf_dev == NULL. as a result, acerhdf_unregister_platform() does not do resource reclaim in acerhdf_init() error path. This patch adds error handing for acerhdf_register_platform(), thus correct the error handing path in acerhdf_init(). goto out_err instead of err_unreg if acerhdf_register_platform() fail. 3. platform_device_del() should only used in error handling. Current implementation missed a platform_device_put() in acerhdf_exit. This patch fixes it by using platform_device_unregister() instead of platform_device_del() in acerhdf_unregister_platform. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Peter Feuerer <peter@piie.net> Cc: Matthew Garrett <mjg@redhat.com> Acked-by: Borislav Petkov <bp@alien8.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Matthew Garrett <mjg@redhat.com>
* asus-laptop: return proper error for store_ledd if write_acpi_int failAxel Lin2010-08-031-3/+4
| | | | | | | | | | | | | In current implementation, store_ledd() does not return error if write_acpi_int fail. This patch fixes it by return -ENODEV if write_acpi_int fail. Signed-off-by: Axel Lin <axel.lin@gmail.com> Cc: Matthew Garrett <mjg@redhat.com> Cc: Corentin Chary <corentincj@iksaif.net> Cc: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Matthew Garrett <mjg@redhat.com>
OpenPOWER on IntegriCloud