aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-05-22 10:33:38 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-05-22 10:33:38 -0400
commit66a26a8fa7694cdfa418d1527416c4ea079309f4 (patch)
treebedf1c89bf03d074bc7d636e9783d82df093506e
parent9a2845c453d170e4e9b1437fa671dbf39b0e7bd8 (diff)
parent8e9bb19ef97d6594e735bee64b6d72103e350854 (diff)
Merge branch 'sh/for-2.6.30' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
* 'sh/for-2.6.30' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: video: stop sh_mobile_lcdcfb only if started sh: ap325 camera without i2c driver fix
-rw-r--r--arch/sh/boards/board-ap325rxa.c3
-rw-r--r--drivers/video/sh_mobile_lcdcfb.c7
2 files changed, 9 insertions, 1 deletions
diff --git a/arch/sh/boards/board-ap325rxa.c b/arch/sh/boards/board-ap325rxa.c
index 39e46919df14..f2a29641b6a3 100644
--- a/arch/sh/boards/board-ap325rxa.c
+++ b/arch/sh/boards/board-ap325rxa.c
@@ -263,6 +263,9 @@ static int camera_probe(void)
263 struct i2c_msg msg; 263 struct i2c_msg msg;
264 int ret; 264 int ret;
265 265
266 if (!a)
267 return -ENODEV;
268
266 camera_power(1); 269 camera_power(1);
267 msg.addr = 0x6e; 270 msg.addr = 0x6e;
268 msg.buf = camera_ncm03j_magic; 271 msg.buf = camera_ncm03j_magic;
diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c
index 92ea0ab44ce2..f10d2fbeda06 100644
--- a/drivers/video/sh_mobile_lcdcfb.c
+++ b/drivers/video/sh_mobile_lcdcfb.c
@@ -47,6 +47,7 @@ struct sh_mobile_lcdc_priv {
47#endif 47#endif
48 unsigned long lddckr; 48 unsigned long lddckr;
49 struct sh_mobile_lcdc_chan ch[2]; 49 struct sh_mobile_lcdc_chan ch[2];
50 int started;
50}; 51};
51 52
52/* shared registers */ 53/* shared registers */
@@ -451,6 +452,7 @@ static int sh_mobile_lcdc_start(struct sh_mobile_lcdc_priv *priv)
451 452
452 /* start the lcdc */ 453 /* start the lcdc */
453 sh_mobile_lcdc_start_stop(priv, 1); 454 sh_mobile_lcdc_start_stop(priv, 1);
455 priv->started = 1;
454 456
455 /* tell the board code to enable the panel */ 457 /* tell the board code to enable the panel */
456 for (k = 0; k < ARRAY_SIZE(priv->ch); k++) { 458 for (k = 0; k < ARRAY_SIZE(priv->ch); k++) {
@@ -493,7 +495,10 @@ static void sh_mobile_lcdc_stop(struct sh_mobile_lcdc_priv *priv)
493 } 495 }
494 496
495 /* stop the lcdc */ 497 /* stop the lcdc */
496 sh_mobile_lcdc_start_stop(priv, 0); 498 if (priv->started) {
499 sh_mobile_lcdc_start_stop(priv, 0);
500 priv->started = 0;
501 }
497 502
498 /* stop clocks */ 503 /* stop clocks */
499 for (k = 0; k < ARRAY_SIZE(priv->ch); k++) 504 for (k = 0; k < ARRAY_SIZE(priv->ch); k++)