[PATCH v2] [media]: sn9c20x: centralize repeated error/info messages with macros

2014-09-08 Thread Morgan Phillips
Create inline functions to print info/error messages: "sensor detected" and "sensor initialization failed" which are used identically in many places. This makes it easier to change the message formats en masse and frees up some memory by centralizing repeated strings. S

[PATCH v2] [media]: sn9c20x.c: fix checkpatch error: that open brace { should be on the previous line

2014-09-08 Thread Morgan Phillips
Change array initialization format to fix style error. from: u8 foo[] = {1, 2, 3}; to: u8 foo[] = { 1, 2, 3 }; Signed-off-by: Morgan Phillips --- Changes since v2: * adds a more

[PATCH] [media]: sn9c20x: centralize repeated error/info messages with macros

2014-09-08 Thread Morgan Phillips
Create inline functions to print info/error messages: "sensor detected" and "sensor initialization failed" which are used identically in many places. This makes it easier to change the message formats en masse and frees up some memory by centralizing repeated strings. S

[PATCH] [media]: sn9c20x: fix checkpatch warning: sizeof cmatrix should be sizeof(cmatrix)

2014-09-08 Thread Morgan Phillips
Signed-off-by: Morgan Phillips --- drivers/media/usb/gspca/sn9c20x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/usb/gspca/sn9c20x.c b/drivers/media/usb/gspca/sn9c20x.c index 41a9a89..dd120d4 100644 --- a/drivers/media/usb/gspca/sn9c20x.c +++ b/drivers

[PATCH] [media]: sn9c20x.c: fix checkpatch error: that open brace { should be on the previous line

2014-09-08 Thread Morgan Phillips
Signed-off-by: Morgan Phillips --- drivers/media/usb/gspca/sn9c20x.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/media/usb/gspca/sn9c20x.c b/drivers/media/usb/gspca/sn9c20x.c index 41a9a89..95467f0 100644 --- a/drivers/media/usb/gspca/sn9c20x.c +++ b

[PATCH] [media] sn9c20x: refactor initialization functions and fix lint warnings/errors

2014-09-07 Thread Morgan Phillips
nit_sensor_w1, _init_sensor_w2). Alter generically named function parameters (data, len), annotated with comments, so that they are self descriptive. Reformat struct initializations, line lengths, and variable declarations to follow style guidelines. Signed-off-by: Morgan Phillips --- drivers/media/usb/gs