soc_camera: Add soc_camera_match function
PATCH 1/1 soc_camera: Add soc_camera_match function
${LINUX}/drivers/base/dd.c :: __device_attach
use driver_match_device function.
It needs bus->match function.
---
Quoted 1 line
Guennadi
I tried latest Linux 2.6.29 from Paul's git
git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6.git
Then, soc_camera doesn't works.
please check 49b420a13ff95b449947181190b08367348e3e1b But I'm not sure is this patch correct fix ?
drivers/media/video/soc_camera.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-)
drivers/media/video/soc_camera.c +9 -0
@@ -929,12 +929,21 @@ static int soc_camera_resume(struct device *dev)return ret; } +int soc_camera_match (struct device *dev,struct device_driver *drv) +{ +struct soc_camera_device *icd =to_soc_camera_dev (dev); +struct soc_camera_host *ici =to_soc_camera_host (icd->dev.parent); + +return ici->nr == icd->iface; +} +static struct bus_type soc_camera_bus_type = { .name ="soc-camera" , .probe = soc_camera_probe, .remove = soc_camera_remove, .suspend = soc_camera_suspend, .resume = soc_camera_resume, + .match = soc_camera_match, };static struct device_driver ic_drv = {
Signature · 1 line
1.5.6.3
Quoted 8 lines · Kuninori Morimoto
${LINUX}/drivers/base/dd.c::__device_attach
usedriver_match_devicefunction.
It needsbus->matchfunction.Signed-off-by Kuninori Morimoto <[email protected]>---
Quoted 8 lines
Quoted 1 line
Guennadi
I tried latest Linux 2.6.29 from Paul's git
git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6.gitThen,
soc_cameradoesn't works.
please check49b420a13ff95b449947181190b08367348e3e1bBut I'm not sure is this patch correct fix ?
Please, see http://marc.info/?t=123245859800006&r=1&w=2
Thanks
Guennadi
Quoted 33 lines
drivers/media/video/soc_camera.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-)drivers/media/video/soc_camera.c +9
-0@@ -929,12 +929,21 @@ static int soc_camera_resume(struct device *dev)return ret; } +int soc_camera_match (struct device *dev,struct device_driver *drv) +{ +struct soc_camera_device *icd =to_soc_camera_dev (dev); +struct soc_camera_host *ici =to_soc_camera_host (icd->dev.parent); + +return ici->nr == icd->iface; +} +static struct bus_type soc_camera_bus_type = { .name ="soc-camera" , .probe = soc_camera_probe, .remove = soc_camera_remove, .suspend = soc_camera_suspend, .resume = soc_camera_resume, + .match = soc_camera_match, };static struct device_driver ic_drv = {Signature · 1 line
1.5.6.3
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
Dear Guennadi
Quoted 5 lines
Quoted 3 lines
Then,
soc_cameradoesn't works.
please check49b420a13ff95b449947181190b08367348e3e1bBut I'm not sure is this patch correct fix ?Please, see http://marc.info/?t=123245859800006&r=1&w=2
wow !!
Thank you
Best regards
--
Kuninori Morimoto