diff options
author | Ingo Molnar <mingo@kernel.org> | 2012-05-30 10:59:04 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2012-05-30 10:59:04 +0200 |
commit | 063e04776172f93b16a5eefd5661a340c1126513 (patch) | |
tree | 19cb1623631c8cc5dcf0d91f4731feec7cbefa04 /drivers/media/video/gspca/stv06xx/stv06xx.c | |
parent | 59cd358a7a5b2f6b61faa01dae6cfda3830ac62a (diff) | |
parent | 731a7378b81c2f5fa88ca1ae20b83d548d5613dc (diff) | |
download | linux-063e04776172f93b16a5eefd5661a340c1126513.tar.gz linux-063e04776172f93b16a5eefd5661a340c1126513.tar.xz linux-063e04776172f93b16a5eefd5661a340c1126513.zip |
Merge branch 'linus' into perf/urgent
Merge back Linus's latest branch so that we pick up the uprobes changes.
( I tested this branch locally and while it's one from the middle of the
merge window it's a good one to base further work off. )
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/media/video/gspca/stv06xx/stv06xx.c')
-rw-r--r-- | drivers/media/video/gspca/stv06xx/stv06xx.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/drivers/media/video/gspca/stv06xx/stv06xx.c b/drivers/media/video/gspca/stv06xx/stv06xx.c index 91d99b4cc57b..999ec7764449 100644 --- a/drivers/media/video/gspca/stv06xx/stv06xx.c +++ b/drivers/media/video/gspca/stv06xx/stv06xx.c @@ -261,6 +261,17 @@ static int stv06xx_init(struct gspca_dev *gspca_dev) return (err < 0) ? err : 0; } +/* this function is called at probe time */ +static int stv06xx_init_controls(struct gspca_dev *gspca_dev) +{ + struct sd *sd = (struct sd *) gspca_dev; + + PDEBUG(D_PROBE, "Initializing controls"); + + gspca_dev->vdev.ctrl_handler = &gspca_dev->ctrl_handler; + return sd->sensor->init_controls(sd); +} + /* Start the camera */ static int stv06xx_start(struct gspca_dev *gspca_dev) { @@ -512,6 +523,7 @@ static const struct sd_desc sd_desc = { .name = MODULE_NAME, .config = stv06xx_config, .init = stv06xx_init, + .init_controls = stv06xx_init_controls, .start = stv06xx_start, .stopN = stv06xx_stopN, .pkt_scan = stv06xx_pkt_scan, @@ -530,9 +542,8 @@ static int stv06xx_config(struct gspca_dev *gspca_dev, PDEBUG(D_PROBE, "Configuring camera"); - sd->desc = sd_desc; sd->bridge = id->driver_info; - gspca_dev->sd_desc = &sd->desc; + gspca_dev->sd_desc = &sd_desc; if (dump_bridge) stv06xx_dump_bridge(sd); @@ -594,11 +605,12 @@ static void sd_disconnect(struct usb_interface *intf) { struct gspca_dev *gspca_dev = usb_get_intfdata(intf); struct sd *sd = (struct sd *) gspca_dev; + void *priv = sd->sensor_priv; PDEBUG(D_PROBE, "Disconnecting the stv06xx device"); - if (sd->sensor->disconnect) - sd->sensor->disconnect(sd); + sd->sensor = NULL; gspca_disconnect(intf); + kfree(priv); } static struct usb_driver sd_driver = { @@ -609,6 +621,7 @@ static struct usb_driver sd_driver = { #ifdef CONFIG_PM .suspend = gspca_suspend, .resume = gspca_resume, + .reset_resume = gspca_resume, #endif }; |