diff options
author | Erik Andrén <erik.andren@gmail.com> | 2008-11-26 02:12:59 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-12-30 06:39:52 -0500 |
commit | fce65f6515f049dea9451afaa0e85af01aecd190 (patch) | |
tree | 0074863f9aa4dd8951e51decaaf90d353e1e61d3 /drivers/media/video/gspca/m5602/m5602_po1030.c | |
parent | 6dc4cff0c391c691dae56486f854534658fdfea8 (diff) |
V4L/DVB (10014): gspca - m5602: Remove all sensor specific write functions.
Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/gspca/m5602/m5602_po1030.c')
-rw-r--r-- | drivers/media/video/gspca/m5602/m5602_po1030.c | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/drivers/media/video/gspca/m5602/m5602_po1030.c b/drivers/media/video/gspca/m5602/m5602_po1030.c index 2c65f0c37ff1..f52a3cd3343f 100644 --- a/drivers/media/video/gspca/m5602/m5602_po1030.c +++ b/drivers/media/video/gspca/m5602/m5602_po1030.c | |||
@@ -99,48 +99,6 @@ out: | |||
99 | return err; | 99 | return err; |
100 | } | 100 | } |
101 | 101 | ||
102 | int po1030_write_sensor(struct sd *sd, const u8 address, | ||
103 | u8 *i2c_data, const u8 len) | ||
104 | { | ||
105 | int err, i; | ||
106 | u8 *p; | ||
107 | struct usb_device *udev = sd->gspca_dev.dev; | ||
108 | __u8 *buf = sd->gspca_dev.usb_buf; | ||
109 | |||
110 | /* The po1030 only supports one byte writes */ | ||
111 | if (len > 1 || !len) | ||
112 | return -EINVAL; | ||
113 | |||
114 | memcpy(buf, sensor_urb_skeleton, sizeof(sensor_urb_skeleton)); | ||
115 | |||
116 | buf[11] = sd->sensor->i2c_slave_id; | ||
117 | buf[15] = address; | ||
118 | |||
119 | p = buf + 16; | ||
120 | |||
121 | /* Copy a four byte write sequence for each byte to be written to */ | ||
122 | for (i = 0; i < len; i++) { | ||
123 | memcpy(p, sensor_urb_skeleton + 16, 4); | ||
124 | p[3] = i2c_data[i]; | ||
125 | p += 4; | ||
126 | PDEBUG(D_CONF, "Writing sensor register 0x%x with 0x%x", | ||
127 | address, i2c_data[i]); | ||
128 | } | ||
129 | |||
130 | /* Copy the footer */ | ||
131 | memcpy(p, sensor_urb_skeleton + 20, 4); | ||
132 | |||
133 | /* Set the total length */ | ||
134 | p[3] = 0x10 + len; | ||
135 | |||
136 | err = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), | ||
137 | 0x04, 0x40, 0x19, | ||
138 | 0x0000, buf, | ||
139 | 20 + len * 4, M5602_URB_MSG_TIMEOUT); | ||
140 | |||
141 | return (err < 0) ? err : 0; | ||
142 | } | ||
143 | |||
144 | int po1030_init(struct sd *sd) | 102 | int po1030_init(struct sd *sd) |
145 | { | 103 | { |
146 | int i, err = 0; | 104 | int i, err = 0; |