diff options
author | Lad, Prabhakar <prabhakar.lad@ti.com> | 2012-11-20 07:30:36 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-12-21 14:18:50 -0200 |
commit | caff80c35f923806b7e5ef312dce41663b5e99b9 (patch) | |
tree | a7dc2f10963df469808b7a52fd90276701d644f5 /drivers/media/platform/davinci/vpbe_display.c | |
parent | 5a89fac7e90dd75b9783914fa351069d20fd8c54 (diff) | |
download | talos-obmc-linux-caff80c35f923806b7e5ef312dce41663b5e99b9.tar.gz talos-obmc-linux-caff80c35f923806b7e5ef312dce41663b5e99b9.zip |
[media] davinci: vpbe: pass different platform names to handle different ip's
The vpbe driver can handle different platforms DM644X, DM36X and
DM355. To differentiate between this platforms venc_type/vpbe_type
was passed as part of platform data which was incorrect. The correct
way to differentiate to handle this case is by passing different
platform names.
This patch creates platform_device_id[] array supporting different
platforms and assigns id_table to the platform driver, and finally
in the probe gets the actual device by using platform_get_device_id()
and gets the appropriate driver data for that platform.
Taking this approach will also make the DT transition easier.
Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Acked-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/platform/davinci/vpbe_display.c')
-rw-r--r-- | drivers/media/platform/davinci/vpbe_display.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/platform/davinci/vpbe_display.c b/drivers/media/platform/davinci/vpbe_display.c index 2bfde7958fef..3846890ea707 100644 --- a/drivers/media/platform/davinci/vpbe_display.c +++ b/drivers/media/platform/davinci/vpbe_display.c @@ -1656,7 +1656,7 @@ static int vpbe_device_get(struct device *dev, void *data) if (strcmp("vpbe_controller", pdev->name) == 0) vpbe_disp->vpbe_dev = platform_get_drvdata(pdev); - if (strcmp("vpbe-osd", pdev->name) == 0) + if (strstr(pdev->name, "vpbe-osd") != NULL) vpbe_disp->osd_device = platform_get_drvdata(pdev); return 0; |