summaryrefslogtreecommitdiff
path: root/drivers/media/usb/gspca/m5602/m5602_ov7660.c
AgeCommit message (Collapse)Author
2017-12-08media: gspca: Convert PDEBUG to gspca_dbgJoe Perches
Use a more typical logging style. The current macro hides the gspca_dev argument so add it to the macro uses instead. Miscellanea: o Add missing '\n' terminations to formats o Realign arguments to open parenthesis o Remove commented out uses of PDEBUG Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-06-24m5602_ov7660: move skeletons to the .c fileMauro Carvalho Chehab
The header file has some private static structures that are used only by the C file. Move those structures to the C file, in order to shut up gcc 6.1 warnings. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2013-03-22[media] m5602_ov7660: return error at ov7660_init()Mauro Carvalho Chehab
It used to be a code that returns arror at ov7660_init. However, this was removed by changeset c84e412f: @@ -231,33 +116,40 @@ int ov7660_init(struct sd *sd) if (dump_sensor) ov7660_dump_registers(sd); - err = ov7660_set_gain(&sd->gspca_dev, sensor_settings[GAIN_IDX]); - if (err < 0) - return err; + return 0; +} - err = ov7660_set_auto_white_balance(&sd->gspca_dev, - sensor_settings[AUTO_WHITE_BALANCE_IDX]); - if (err < 0) - return err; As complained by gcc: drivers/media/usb/gspca/m5602/m5602_ov7660.c: In function 'ov7660_init': drivers/media/usb/gspca/m5602/m5602_ov7660.c:99:9: warning: variable 'err' set but not used [-Wunused-but-set-variable] It should be noticed that the original error code was crappy, as it wasn't returning any error if sensor init fails. Fix it by returning an error if the sensor can't be initialized. Cc: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05[media] gspca: Remove gspca-specific debug magicTheodore Kilgore
Instead use v4l2_dbg and v4l2_err. Note that the PDEBUG macro is kept to make this patch-set less invasive, but it is simply a wrapper around v4l2_dbg now. Most of the other changes are there to make the dev parameter for the v4l2_xxx macros available everywhere we do logging. Signed-off-by: Theodore Kilgore <kilgota@auburn.edu> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-05[media] gscpa_m5602: Convert to the control frameworkHans de Goede
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-15[media] rename most media/video usb drivers to media/usbMauro Carvalho Chehab
Rename all USB drivers with their own directory under drivers/media/video into drivers/media/usb and update the building system. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>