drivers/usb/media/pwc/: make code static
PATCH 1/1 drivers/usb/media/pwc/: make code static
This patch makes needlessly global code static.
Signed-off-by Adrian Bunk <[email protected]>
---
drivers/usb/media/pwc/pwc-ctrl.c | 76 +++++++++++++++---------------- drivers/usb/media/pwc/pwc-if.c | 2 drivers/usb/media/pwc/pwc.h | 6 -- 3 files changed, 40 insertions(+), 44 deletions(-)
drivers/usb/media/pwc/pwc.h renamed from drivers/usb/media/pwc/pwc.h.old +1 -5
@@ -226,9 +226,8 @@extern "C" {#endif -/* Global variables */ +/* Global variable */ extern int pwc_trace; -extern int pwc_preferred_compression;/** functions in pwc-if.c */ int pwc_try_video_mode (struct pwc_device *pdev,int width,int height,int new_fps,int new_compression,int new_snapshot);
@@ -243,8 +242,6 @@/** Functions in pwc-ctrl.c */ /* Request a certain video mode. Returns < 0 if not possible */ extern int pwc_set_video_mode (struct pwc_device *pdev,int width,int height,int frames,int compression,int snapshot); -/* Calculate the number of bytes per image (not frame) */ -extern void pwc_set_image_buffer_size (struct pwc_device *pdev);/* Various controls; should be obvious. Value 0..65535, or < 0 on error */ extern int pwc_get_brightness (struct pwc_device *pdev);
@@ -256,7 +253,6 @@extern int pwc_get_saturation (struct pwc_device *pdev);extern int pwc_set_saturation (struct pwc_device *pdev,int value);extern int pwc_set_leds (struct pwc_device *pdev,int on_value,int off_value); -extern int pwc_get_leds (struct pwc_device *pdev,int *on_value,int *off_value);extern int pwc_get_cmos_sensor (struct pwc_device *pdev,int *sensor);/* Power down or up the camera; not supported by all models */
drivers/usb/media/pwc/pwc-ctrl.c renamed from drivers/usb/media/pwc/pwc-ctrl.c.old +38 -38
88 lines not on this page · raw message
drivers/usb/media/pwc/pwc-if.c renamed from drivers/usb/media/pwc/pwc-if.c.old +1 -1
@@ -129,7 +129,7 @@int pwc_trace =TRACE_MODULE |TRACE_FLOW |TRACE_PWCX ;static int power_save =0 ;static int led_on =100 , led_off =0 ;/* defaults to LED that is on while in use */ -int pwc_preferred_compression =2 ;/* 0..3 = uncompressed..high */ +static int pwc_preferred_compression =2 ;/* 0..3 = uncompressed..high */ static struct { int type; char serial_number[30];
PATCH 1/1 drivers/usb/media/pwc/: make code static
This patch lacked a small bit.
Updated patch below.
cu
Adrian
<-- snip -->
This patch makes needlessly global code static.
Signed-off-by Adrian Bunk <[email protected]>
---
drivers/usb/media/pwc/pwc-ctrl.c | 78 +++++++++++++++---------------- drivers/usb/media/pwc/pwc-if.c | 2 drivers/usb/media/pwc/pwc.h | 6 -- 3 files changed, 41 insertions(+), 45 deletions(-)
drivers/usb/media/pwc/pwc.h renamed from drivers/usb/media/pwc/pwc.h.old +1 -5
@@ -226,9 +226,8 @@extern "C" {#endif -/* Global variables */ +/* Global variable */ extern int pwc_trace; -extern int pwc_preferred_compression;/** functions in pwc-if.c */ int pwc_try_video_mode (struct pwc_device *pdev,int width,int height,int new_fps,int new_compression,int new_snapshot);
@@ -243,8 +242,6 @@/** Functions in pwc-ctrl.c */ /* Request a certain video mode. Returns < 0 if not possible */ extern int pwc_set_video_mode (struct pwc_device *pdev,int width,int height,int frames,int compression,int snapshot); -/* Calculate the number of bytes per image (not frame) */ -extern void pwc_set_image_buffer_size (struct pwc_device *pdev);/* Various controls; should be obvious. Value 0..65535, or < 0 on error */ extern int pwc_get_brightness (struct pwc_device *pdev);
@@ -256,7 +253,6 @@extern int pwc_get_saturation (struct pwc_device *pdev);extern int pwc_set_saturation (struct pwc_device *pdev,int value);extern int pwc_set_leds (struct pwc_device *pdev,int on_value,int off_value); -extern int pwc_get_leds (struct pwc_device *pdev,int *on_value,int *off_value);extern int pwc_get_cmos_sensor (struct pwc_device *pdev,int *sensor);/* Power down or up the camera; not supported by all models */
drivers/usb/media/pwc/pwc-ctrl.c renamed from drivers/usb/media/pwc/pwc-ctrl.c.old +39 -39
96 lines not on this page · raw message
drivers/usb/media/pwc/pwc-if.c renamed from drivers/usb/media/pwc/pwc-if.c.old +1 -1
@@ -129,7 +129,7 @@int pwc_trace =TRACE_MODULE |TRACE_FLOW |TRACE_PWCX ;static int power_save =0 ;static int led_on =100 , led_off =0 ;/* defaults to LED that is on while in use */ -int pwc_preferred_compression =2 ;/* 0..3 = uncompressed..high */ +static int pwc_preferred_compression =2 ;/* 0..3 = uncompressed..high */ static struct { int type; char serial_number[30];
Greg KH
AppliedQuoted 4 lines · Adrian Bunk
This patch lacked a small bit.
Updated patch below.
Quoted 8 lines
cu
Adrian<-- snip -->
This patch makes needlessly global code static.
Applied, thanks.
greg k-h