mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
drivers/video/backlight/platform_lcd.c: introduce probe callback
Platform LCD devices may need to do some device-specific initialization before they can be used (regulator or GPIO setup, for example), but currently the driver does not support any way of doing this. This patch adds a probe() callback to plat_lcd_data which platform LCD devices can set to indicate that device-specific initialization is needed. Signed-off-by: Andrew Bresticker <[email protected]> Cc: Richard Purdie <[email protected]> Cc: Florian Tobias Schandinat <[email protected]> Reviewed-by: Doug Anderson <[email protected]> Acked-by: Jingoo Han <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
40d88fc60d
commit
46e1915eef
2 changed files with 7 additions and 0 deletions
|
|
@ -86,6 +86,12 @@ static int platform_lcd_probe(struct platform_device *pdev)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (pdata->probe) {
|
||||
err = pdata->probe(pdata);
|
||||
if (err)
|
||||
return err;
|
||||
}
|
||||
|
||||
plcd = devm_kzalloc(&pdev->dev, sizeof(struct platform_lcd),
|
||||
GFP_KERNEL);
|
||||
if (!plcd) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue