diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2010-09-24 07:35:21 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-10-22 19:53:15 -0400 |
commit | d4c0312363ad16a9991521aec7e19ffe85d49c2a (patch) | |
tree | 8aa1ce457ad867fdd2f575ba9a9d7924cfc16912 /drivers/media | |
parent | 99f7d81bd7c33a31cbd8c87757fa4faa8c6b1425 (diff) |
[media] pvrusb2: Don't use module names to load I2C modules
With the v4l2_i2c_new_subdev* functions now supporting loading modules
based on modaliases, replace the hardcoded module name passed to those
functions by NULL.
All corresponding I2C modules have been checked, and all of them include
a module aliases table with names corresponding to what the pvrusb2
driver uses.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-By: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-hdw.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/drivers/media/video/pvrusb2/pvrusb2-hdw.c index 70ea578d6266..bef202752cc8 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c +++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.c | |||
@@ -2082,20 +2082,13 @@ static int pvr2_hdw_load_subdev(struct pvr2_hdw *hdw, | |||
2082 | return -EINVAL; | 2082 | return -EINVAL; |
2083 | } | 2083 | } |
2084 | 2084 | ||
2085 | /* Note how the 2nd and 3rd arguments are the same for | ||
2086 | * v4l2_i2c_new_subdev(). Why? | ||
2087 | * Well the 2nd argument is the module name to load, while the 3rd | ||
2088 | * argument is documented in the framework as being the "chipid" - | ||
2089 | * and every other place where I can find examples of this, the | ||
2090 | * "chipid" appears to just be the module name again. So here we | ||
2091 | * just do the same thing. */ | ||
2092 | if (i2ccnt == 1) { | 2085 | if (i2ccnt == 1) { |
2093 | pvr2_trace(PVR2_TRACE_INIT, | 2086 | pvr2_trace(PVR2_TRACE_INIT, |
2094 | "Module ID %u:" | 2087 | "Module ID %u:" |
2095 | " Setting up with specified i2c address 0x%x", | 2088 | " Setting up with specified i2c address 0x%x", |
2096 | mid, i2caddr[0]); | 2089 | mid, i2caddr[0]); |
2097 | sd = v4l2_i2c_new_subdev(&hdw->v4l2_dev, &hdw->i2c_adap, | 2090 | sd = v4l2_i2c_new_subdev(&hdw->v4l2_dev, &hdw->i2c_adap, |
2098 | fname, fname, | 2091 | NULL, fname, |
2099 | i2caddr[0], NULL); | 2092 | i2caddr[0], NULL); |
2100 | } else { | 2093 | } else { |
2101 | pvr2_trace(PVR2_TRACE_INIT, | 2094 | pvr2_trace(PVR2_TRACE_INIT, |
@@ -2103,7 +2096,7 @@ static int pvr2_hdw_load_subdev(struct pvr2_hdw *hdw, | |||
2103 | " Setting up with address probe list", | 2096 | " Setting up with address probe list", |
2104 | mid); | 2097 | mid); |
2105 | sd = v4l2_i2c_new_subdev(&hdw->v4l2_dev, &hdw->i2c_adap, | 2098 | sd = v4l2_i2c_new_subdev(&hdw->v4l2_dev, &hdw->i2c_adap, |
2106 | fname, fname, | 2099 | NULL, fname, |
2107 | 0, i2caddr); | 2100 | 0, i2caddr); |
2108 | } | 2101 | } |
2109 | 2102 | ||