Commit f7a3c997af148b13a6225898c9bde1cb858924ba
Committed by
Linus Torvalds
1 parent
be987d9f80
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
drivers/video/backlight/ams369fg06.c: make power_on() call optional
This patch makes power_on() call optional. The voltage source can be provided to some boards using ams369fg06 panel, thus in this case, power on/off sequence is not necessary. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 1 changed file with 3 additions and 5 deletions Side-by-side Diff
drivers/video/backlight/ams369fg06.c
... | ... | @@ -317,10 +317,7 @@ |
317 | 317 | pd = lcd->lcd_pd; |
318 | 318 | bd = lcd->bd; |
319 | 319 | |
320 | - if (!pd->power_on) { | |
321 | - dev_err(lcd->dev, "power_on is NULL.\n"); | |
322 | - return -EINVAL; | |
323 | - } else { | |
320 | + if (pd->power_on) { | |
324 | 321 | pd->power_on(lcd->ld, 1); |
325 | 322 | msleep(pd->power_on_delay); |
326 | 323 | } |
... | ... | @@ -370,7 +367,8 @@ |
370 | 367 | |
371 | 368 | msleep(pd->power_off_delay); |
372 | 369 | |
373 | - pd->power_on(lcd->ld, 0); | |
370 | + if (pd->power_on) | |
371 | + pd->power_on(lcd->ld, 0); | |
374 | 372 | |
375 | 373 | return 0; |
376 | 374 | } |