Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 164212
b: refs/heads/master
c: 0bab829
h: refs/heads/master
v: v3
  • Loading branch information
Guennadi Liakhovetski authored and Mauro Carvalho Chehab committed Sep 19, 2009
1 parent d840dba commit 7de61af
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dd4f0ad4b027078b0642d99a2d30c9c93a5e38ac
refs/heads/master: 0bab829de1ab60d8c3cbf7e402192bb9446840b7
14 changes: 12 additions & 2 deletions trunk/arch/sh/boards/board-ap325rxa.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,13 +329,19 @@ static struct soc_camera_platform_info camera_info = {
.bus_id = 0,
.add_device = ap325rxa_camera_add,
.del_device = ap325rxa_camera_del,
.module_name = "soc_camera_platform",
},
};

static void dummy_release(struct device *dev)
{
}

static struct platform_device camera_device = {
.name = "soc_camera_platform",
.dev = {
.platform_data = &camera_info,
.release = dummy_release,
},
};

Expand All @@ -352,8 +358,12 @@ static int ap325rxa_camera_add(struct soc_camera_link *icl,

static void ap325rxa_camera_del(struct soc_camera_link *icl)
{
if (icl == &camera_info.link)
platform_device_unregister(&camera_device);
if (icl != &camera_info.link)
return;

platform_device_unregister(&camera_device);
memset(&camera_device.dev.kobj, 0,
sizeof(camera_device.dev.kobj));
}
#endif /* CONFIG_I2C */

Expand Down

0 comments on commit 7de61af

Please sign in to comment.