Commit Graph

3 Commits

Author SHA1 Message Date
Stephen Boyd 42dbb35a3b switch_class: Use appropriate device attribute permissions
These files are only readable.

WARNING: at drivers/base/core.c:576 device_create_file+0x3c/0x84()
Attribute state: write permission without 'store'
Modules linked in:
CPU: 1 PID: 1 Comm: swapper/0 Tainted: G        W    3.10.0-rc5-gee3e35b-09313-g02903cf #640
[<c0014220>] (unwind_backtrace+0x0/0x120) from [<c001212c>] (show_stack+0x10/0x14)
[<c001212c>] (show_stack+0x10/0x14) from [<c00841dc>] (warn_slowpath_common+0x4c/0x68)
[<c00841dc>] (warn_slowpath_common+0x4c/0x68) from [<c0084278>] (warn_slowpath_fmt+0x2c/0x3c)
[<c0084278>] (warn_slowpath_fmt+0x2c/0x3c) from [<c034459c>] (device_create_file+0x3c/0x84)
[<c034459c>] (device_create_file+0x3c/0x84) from [<c0540998>] (switch_dev_register+0x80/0xf0)
[<c0540998>] (switch_dev_register+0x80/0xf0) from [<c0c36aec>] (snd_usb_audio_init+0x54/0xbc)
[<c0c36aec>] (snd_usb_audio_init+0x54/0xbc) from [<c0008768>] (do_one_initcall+0xcc/0x180)
[<c0008768>] (do_one_initcall+0xcc/0x180) from [<c0c0029c>] (kernel_init_freeable+0xf4/0x1d0)
[<c0c0029c>] (kernel_init_freeable+0xf4/0x1d0) from [<c071ed18>] (kernel_init+0x8/0xe4)
[<c071ed18>] (kernel_init+0x8/0xe4) from [<c000e1b8>] (ret_from_fork+0x14/0x3c)

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2013-09-04 17:23:33 -07:00
Deva Ramasubramanian fa9538adf7 switch: Reset device's drvdata before destroying it
dev_set_drvdata() sets the device specific driver data at
dev->p->driver_data.  However, dev is destroyed and has it's
context memory freed in device_destroy().  As a result, calling
dev_set_drvdata() causes a fault when accessing dev->p.

Change-Id: I4b1e6d17db52d0e31caf9b52e59979ff9cbb0c12
CRs-Fixed: 449732
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
2013-07-08 06:11:29 -07:00
Mike Lockwood f06f5b205b switch: switch class and GPIO drivers.
switch: Export symbol switch_set_state.

Signed-off-by: Mike Lockwood <lockwood@android.com>

switch: gpio: Don't call request_irq with interrupts disabled

Signed-off-by: Arve Hjønnevåg <arve@android.com>

switch: Use device_create instead of device_create_drvdata.

device_create_drvdata is obsolete.

Signed-off-by: Arve Hjønnevåg <arve@android.com>

switch_gpio: Add missing #include <linux/interrupt.h>

Change-Id: I6c397e41bbe1457162cc69e31a29db5d9f76fccb
Signed-off-by: Mike Lockwood <lockwood@android.com>
2013-07-01 13:40:19 -07:00