From 9e60449d4bd9eb32a8eab36e880e8db117cd2850 Mon Sep 17 00:00:00 2001 From: Jean-Francois Moine Date: Tue, 26 Aug 2008 08:03:51 +0200 Subject: gspca: Change some subdriver functions for suspend/resume. From: Jean-Francois Moine - 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 --- linux/drivers/media/video/gspca/spca506.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'linux/drivers/media/video/gspca/spca506.c') diff --git a/linux/drivers/media/video/gspca/spca506.c b/linux/drivers/media/video/gspca/spca506.c index ae772488c..195dce96e 100644 --- a/linux/drivers/media/video/gspca/spca506.c +++ b/linux/drivers/media/video/gspca/spca506.c @@ -313,8 +313,8 @@ static int sd_config(struct gspca_dev *gspca_dev, return 0; } -/* 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 usb_device *dev = gspca_dev->dev; @@ -560,14 +560,6 @@ static void sd_stopN(struct gspca_dev *gspca_dev) reg_w(dev, 0x03, 0x00, 0x0003); } -static void sd_stop0(struct gspca_dev *gspca_dev) -{ -} - -static void sd_close(struct gspca_dev *gspca_dev) -{ -} - static void sd_pkt_scan(struct gspca_dev *gspca_dev, struct gspca_frame *frame, /* target */ __u8 *data, /* isoc packet */ @@ -740,11 +732,9 @@ static 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, }; -- cgit v1.2.3