Commit Graph

8 Commits

Author SHA1 Message Date
Tao Huang
f9eefeeaa7 rk: add SPDX license identifier to files with no license
Change-Id: I754250669891307b0deab2bdab1bd01512713f79
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-01-31 20:56:06 +08:00
Huang, Tao
92ee5ce90b drivers: switch: clear drvdata before device_destroy
Otherwise, we see write after free.

=============================================================================
BUG kmalloc-1024 (Not tainted): Poison overwritten
-----------------------------------------------------------------------------

INFO: 0xc599bcc4-0xc599bcc7. First byte 0x0 instead of 0x6b
INFO: Allocated in device_create_groups_vargs+0x34/0xcc age=43 cpu=3 pid=1
	kmem_cache_alloc_trace+0xd8/0x378
	device_create_groups_vargs+0x34/0xcc
	device_create_vargs+0x20/0x28
	device_create+0x28/0x48
	switch_dev_register+0x80/0x108
	dw_hdmi_bind+0x38c/0x9e4
	dw_hdmi_rockchip_bind+0x248/0x38c
	component_bind_all+0x78/0x1e4
	rockchip_drm_bind+0x1bc/0xbc0
	try_to_bring_up_master.part.0+0xa8/0x138
	component_master_add_with_match+0xb8/0x100
	rockchip_drm_platform_probe+0x188/0x1d0
	platform_drv_probe+0x50/0xa0
	driver_probe_device+0x110/0x2c0
	__driver_attach+0x70/0x94
	bus_for_each_dev+0x94/0xc0
INFO: Freed in device_release+0x5c/0x90 age=42 cpu=3 pid=1
	device_release+0x5c/0x90
	kobject_release+0xd4/0x11c
	device_destroy+0x2c/0x38
	switch_dev_unregister+0x30/0x5c
	dw_hdmi_unbind+0x48/0xc8
	component_bind_all+0x1a4/0x1e4
	rockchip_drm_bind+0x1bc/0xbc0
	try_to_bring_up_master.part.0+0xa8/0x138
	component_master_add_with_match+0xb8/0x100
	rockchip_drm_platform_probe+0x188/0x1d0
	platform_drv_probe+0x50/0xa0
	driver_probe_device+0x110/0x2c0
	__driver_attach+0x70/0x94
	bus_for_each_dev+0x94/0xc0
	bus_add_driver+0xcc/0x1e8
	driver_register+0x9c/0xe0

Change-Id: Ied903eed40212e9666e123dd3f69a2a2966b6bb5
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2017-04-28 18:35:47 +08:00
Huang, Tao
20278af4b8 Revert "Revert "drivers: switch: remove S_IWUSR from dev_attr""
This reverts commit d18fffdddb.

Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2016-07-05 19:00:15 +08:00
Huang, Tao
ce1181f629 Revert "Revert "switch: switch class and GPIO drivers.""
This reverts commit c631c9800f.
We keep switch driver until HDMI work.

Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
2016-07-05 18:58:11 +08:00
Dmitry Shmidt
c631c9800f Revert "switch: switch class and GPIO drivers."
Drivers should use extcon moving forward.
Documentation/extcon/porting-android-switch-class describes
how to port existing switch class drivers to extcon.

This reverts commit e4b8e66e0a.

Change-Id: I5b622c7ab4c0cb9670f8903f259a99888f503c1a
2016-05-19 12:32:41 +05:30
Dmitry Shmidt
d18fffdddb Revert "drivers: switch: remove S_IWUSR from dev_attr"
This reverts commit dc66dee02d.
2016-05-19 12:32:41 +05:30
Qiao Zhou
dc66dee02d drivers: switch: remove S_IWUSR from dev_attr
it doesn't need S_IWUSR attribute since xxx_store API is un-needed.
otherwise the WARN check in device_create_file will alert.

Change-Id: I6360bf022dcd659bfb3f41c84624f954d5d15ea5
Signed-off-by: Qiao Zhou <zhouqiao@marvell.com>
2016-02-16 13:51:00 -08:00
Mike Lockwood
e4b8e66e0a 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>
2016-02-16 13:50:54 -08:00