diff options
author | Jean-Francois Moine <moinejf@free.fr> | 2008-08-26 08:03:51 +0200 |
---|---|---|
committer | Jean-Francois Moine <moinejf@free.fr> | 2008-08-26 08:03:51 +0200 |
commit | 9e60449d4bd9eb32a8eab36e880e8db117cd2850 (patch) | |
tree | 56b6d18337c65839e18df95e284b834df7c022eb /linux/drivers/media/video/gspca/spca501.c | |
parent | 263b1fa0031100d972907961e145719913b4ce15 (diff) | |
download | mediapointer-dvb-s2-9e60449d4bd9eb32a8eab36e880e8db117cd2850.tar.gz mediapointer-dvb-s2-9e60449d4bd9eb32a8eab36e880e8db117cd2850.tar.bz2 |
gspca: Change some subdriver functions for suspend/resume.
From: Jean-Francois Moine <moinejf@free.fr>
- new function 'init' called on probe and resume
- remove the functions 'open' and 'closed'
- 'stopN' and 'stop0' are optional
Priority: high
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Diffstat (limited to 'linux/drivers/media/video/gspca/spca501.c')
-rw-r--r-- | linux/drivers/media/video/gspca/spca501.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/linux/drivers/media/video/gspca/spca501.c b/linux/drivers/media/video/gspca/spca501.c index df657cb9d..49e512cac 100644 --- a/linux/drivers/media/video/gspca/spca501.c +++ b/linux/drivers/media/video/gspca/spca501.c @@ -1964,8 +1964,8 @@ error: return -EINVAL; } -/* this function is called at open time */ -static int sd_open(struct gspca_dev *gspca_dev) +/* 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; @@ -2034,11 +2034,6 @@ static void sd_stopN(struct gspca_dev *gspca_dev) static void sd_stop0(struct gspca_dev *gspca_dev) { -} - -/* this function is called at close time */ -static void sd_close(struct gspca_dev *gspca_dev) -{ reg_write(gspca_dev->dev, SPCA501_REG_CTLRL, 0x05, 0x00); } @@ -2131,11 +2126,10 @@ static const struct sd_desc sd_desc = { .ctrls = sd_ctrls, .nctrls = ARRAY_SIZE(sd_ctrls), .config = sd_config, - .open = sd_open, + .init = sd_init, .start = sd_start, .stopN = sd_stopN, .stop0 = sd_stop0, - .close = sd_close, .pkt_scan = sd_pkt_scan, }; |