diff options
Diffstat (limited to 'drivers/media/usb/gspca/stv0680.c')
-rw-r--r-- | drivers/media/usb/gspca/stv0680.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/media/usb/gspca/stv0680.c b/drivers/media/usb/gspca/stv0680.c index 67605272aaa8..9c0827631b9c 100644 --- a/drivers/media/usb/gspca/stv0680.c +++ b/drivers/media/usb/gspca/stv0680.c | |||
@@ -86,7 +86,7 @@ static int stv_sndctrl(struct gspca_dev *gspca_dev, int set, u8 req, u16 val, | |||
86 | static int stv0680_handle_error(struct gspca_dev *gspca_dev, int ret) | 86 | static int stv0680_handle_error(struct gspca_dev *gspca_dev, int ret) |
87 | { | 87 | { |
88 | stv_sndctrl(gspca_dev, 0, 0x80, 0, 0x02); /* Get Last Error */ | 88 | stv_sndctrl(gspca_dev, 0, 0x80, 0, 0x02); /* Get Last Error */ |
89 | PDEBUG(D_ERR, "last error: %i, command = 0x%x", | 89 | PERR("last error: %i, command = 0x%x", |
90 | gspca_dev->usb_buf[0], gspca_dev->usb_buf[1]); | 90 | gspca_dev->usb_buf[0], gspca_dev->usb_buf[1]); |
91 | return ret; | 91 | return ret; |
92 | } | 92 | } |
@@ -98,7 +98,7 @@ static int stv0680_get_video_mode(struct gspca_dev *gspca_dev) | |||
98 | gspca_dev->usb_buf[0] = 0x0f; | 98 | gspca_dev->usb_buf[0] = 0x0f; |
99 | 99 | ||
100 | if (stv_sndctrl(gspca_dev, 0, 0x87, 0, 0x08) != 0x08) { | 100 | if (stv_sndctrl(gspca_dev, 0, 0x87, 0, 0x08) != 0x08) { |
101 | PDEBUG(D_ERR, "Get_Camera_Mode failed"); | 101 | PERR("Get_Camera_Mode failed"); |
102 | return stv0680_handle_error(gspca_dev, -EIO); | 102 | return stv0680_handle_error(gspca_dev, -EIO); |
103 | } | 103 | } |
104 | 104 | ||
@@ -116,13 +116,13 @@ static int stv0680_set_video_mode(struct gspca_dev *gspca_dev, u8 mode) | |||
116 | gspca_dev->usb_buf[0] = mode; | 116 | gspca_dev->usb_buf[0] = mode; |
117 | 117 | ||
118 | if (stv_sndctrl(gspca_dev, 3, 0x07, 0x0100, 0x08) != 0x08) { | 118 | if (stv_sndctrl(gspca_dev, 3, 0x07, 0x0100, 0x08) != 0x08) { |
119 | PDEBUG(D_ERR, "Set_Camera_Mode failed"); | 119 | PERR("Set_Camera_Mode failed"); |
120 | return stv0680_handle_error(gspca_dev, -EIO); | 120 | return stv0680_handle_error(gspca_dev, -EIO); |
121 | } | 121 | } |
122 | 122 | ||
123 | /* Verify we got what we've asked for */ | 123 | /* Verify we got what we've asked for */ |
124 | if (stv0680_get_video_mode(gspca_dev) != mode) { | 124 | if (stv0680_get_video_mode(gspca_dev) != mode) { |
125 | PDEBUG(D_ERR, "Error setting camera video mode!"); | 125 | PERR("Error setting camera video mode!"); |
126 | return -EIO; | 126 | return -EIO; |
127 | } | 127 | } |
128 | 128 | ||
@@ -146,7 +146,7 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
146 | /* ping camera to be sure STV0680 is present */ | 146 | /* ping camera to be sure STV0680 is present */ |
147 | if (stv_sndctrl(gspca_dev, 0, 0x88, 0x5678, 0x02) != 0x02 || | 147 | if (stv_sndctrl(gspca_dev, 0, 0x88, 0x5678, 0x02) != 0x02 || |
148 | gspca_dev->usb_buf[0] != 0x56 || gspca_dev->usb_buf[1] != 0x78) { | 148 | gspca_dev->usb_buf[0] != 0x56 || gspca_dev->usb_buf[1] != 0x78) { |
149 | PDEBUG(D_ERR, "STV(e): camera ping failed!!"); | 149 | PERR("STV(e): camera ping failed!!"); |
150 | return stv0680_handle_error(gspca_dev, -ENODEV); | 150 | return stv0680_handle_error(gspca_dev, -ENODEV); |
151 | } | 151 | } |
152 | 152 | ||
@@ -156,7 +156,7 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
156 | 156 | ||
157 | if (stv_sndctrl(gspca_dev, 2, 0x06, 0x0200, 0x22) != 0x22 || | 157 | if (stv_sndctrl(gspca_dev, 2, 0x06, 0x0200, 0x22) != 0x22 || |
158 | gspca_dev->usb_buf[7] != 0xa0 || gspca_dev->usb_buf[8] != 0x23) { | 158 | gspca_dev->usb_buf[7] != 0xa0 || gspca_dev->usb_buf[8] != 0x23) { |
159 | PDEBUG(D_ERR, "Could not get descriptor 0200."); | 159 | PERR("Could not get descriptor 0200."); |
160 | return stv0680_handle_error(gspca_dev, -ENODEV); | 160 | return stv0680_handle_error(gspca_dev, -ENODEV); |
161 | } | 161 | } |
162 | if (stv_sndctrl(gspca_dev, 0, 0x8a, 0, 0x02) != 0x02) | 162 | if (stv_sndctrl(gspca_dev, 0, 0x8a, 0, 0x02) != 0x02) |
@@ -167,7 +167,7 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
167 | return stv0680_handle_error(gspca_dev, -ENODEV); | 167 | return stv0680_handle_error(gspca_dev, -ENODEV); |
168 | 168 | ||
169 | if (!(gspca_dev->usb_buf[7] & 0x09)) { | 169 | if (!(gspca_dev->usb_buf[7] & 0x09)) { |
170 | PDEBUG(D_ERR, "Camera supports neither CIF nor QVGA mode"); | 170 | PERR("Camera supports neither CIF nor QVGA mode"); |
171 | return -ENODEV; | 171 | return -ENODEV; |
172 | } | 172 | } |
173 | if (gspca_dev->usb_buf[7] & 0x01) | 173 | if (gspca_dev->usb_buf[7] & 0x01) |