summaryrefslogtreecommitdiff
path: root/linux/drivers/media
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2009-05-29 09:46:12 +0200
committerJean-Francois Moine <moinejf@free.fr>2009-05-29 09:46:12 +0200
commit14614b91f8762ceb2d9ee7e76e424442a72f2483 (patch)
treef5e754f0e9ec91fa8e3655de0fcc54b1ea274d75 /linux/drivers/media
parenta54e4ff7ad973562ecb961a02ea8da66e2334aef (diff)
downloadmediapointer-dvb-s2-14614b91f8762ceb2d9ee7e76e424442a72f2483.tar.gz
mediapointer-dvb-s2-14614b91f8762ceb2d9ee7e76e424442a72f2483.tar.bz2
gspca - spca505: Reinitialize the webcam at resume time.
From: Jean-Francois Moine <moinejf@free.fr> Priority: normal Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Diffstat (limited to 'linux/drivers/media')
-rw-r--r--linux/drivers/media/video/gspca/spca505.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/linux/drivers/media/video/gspca/spca505.c b/linux/drivers/media/video/gspca/spca505.c
index 2acec58b1..ea8c9fe2e 100644
--- a/linux/drivers/media/video/gspca/spca505.c
+++ b/linux/drivers/media/video/gspca/spca505.c
@@ -637,19 +637,19 @@ static int sd_config(struct gspca_dev *gspca_dev,
cam->nmodes = ARRAY_SIZE(vga_mode) - 1;
sd->brightness = BRIGHTNESS_DEF;
- if (sd->subtype == Nxultra) {
- if (write_vector(gspca_dev, spca505b_init_data))
- return -EIO;
- } else {
- if (write_vector(gspca_dev, spca505_init_data))
- return -EIO;
- }
return 0;
}
/* this function is called at probe and resume time */
static int sd_init(struct gspca_dev *gspca_dev)
{
+ struct sd *sd = (struct sd *) gspca_dev;
+
+ if (write_vector(gspca_dev,
+ sd->subtype == Nxultra
+ ? spca505b_init_data
+ : spca505_init_data))
+ return -EIO;
return 0;
}