diff options
author | Erik Andrén <erik.andren@gmail.com> | 2008-11-26 08:12:59 +0100 |
---|---|---|
committer | Erik Andrén <erik.andren@gmail.com> | 2008-11-26 08:12:59 +0100 |
commit | 8f369853f1f50927d68e46e838850b26710af902 (patch) | |
tree | ecc2037c7f09d1b20761e59741fe0e5607bf8ce3 /linux/drivers/media/video/gspca/m5602/m5602_po1030.c | |
parent | 14526dcda1524c3bdfabd8c55cc67d87de8e5d28 (diff) | |
download | mediapointer-dvb-s2-8f369853f1f50927d68e46e838850b26710af902.tar.gz mediapointer-dvb-s2-8f369853f1f50927d68e46e838850b26710af902.tar.bz2 |
Remove all sensor specific write functions.
From: Erik Andrén <erik.andren@gmail.com>
Priority: normal
Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Diffstat (limited to 'linux/drivers/media/video/gspca/m5602/m5602_po1030.c')
-rw-r--r-- | linux/drivers/media/video/gspca/m5602/m5602_po1030.c | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/linux/drivers/media/video/gspca/m5602/m5602_po1030.c b/linux/drivers/media/video/gspca/m5602/m5602_po1030.c index 2c65f0c37..f52a3cd33 100644 --- a/linux/drivers/media/video/gspca/m5602/m5602_po1030.c +++ b/linux/drivers/media/video/gspca/m5602/m5602_po1030.c @@ -99,48 +99,6 @@ out: return err; } -int po1030_write_sensor(struct sd *sd, const u8 address, - u8 *i2c_data, const u8 len) -{ - int err, i; - u8 *p; - struct usb_device *udev = sd->gspca_dev.dev; - __u8 *buf = sd->gspca_dev.usb_buf; - - /* The po1030 only supports one byte writes */ - if (len > 1 || !len) - return -EINVAL; - - memcpy(buf, sensor_urb_skeleton, sizeof(sensor_urb_skeleton)); - - buf[11] = sd->sensor->i2c_slave_id; - buf[15] = address; - - p = buf + 16; - - /* Copy a four byte write sequence for each byte to be written to */ - for (i = 0; i < len; i++) { - memcpy(p, sensor_urb_skeleton + 16, 4); - p[3] = i2c_data[i]; - p += 4; - PDEBUG(D_CONF, "Writing sensor register 0x%x with 0x%x", - address, i2c_data[i]); - } - - /* Copy the footer */ - memcpy(p, sensor_urb_skeleton + 20, 4); - - /* Set the total length */ - p[3] = 0x10 + len; - - err = usb_control_msg(udev, usb_sndctrlpipe(udev, 0), - 0x04, 0x40, 0x19, - 0x0000, buf, - 20 + len * 4, M5602_URB_MSG_TIMEOUT); - - return (err < 0) ? err : 0; -} - int po1030_init(struct sd *sd) { int i, err = 0; |