Commit dbf4805e authored by Tomas Winkler's avatar Tomas Winkler Committed by Greg Kroah-Hartman

staging: easycap: fix sparse warnings 'Should it be static'

easycap_main.c:41:23: warning: symbol 'easycapdc60_dongle' was not declared. Should it be static?
easycap_main.c:49:22: warning: symbol 'easycap_usb_device_id_table' was not declared. Should it be static?
easycap_main.c:69:30: warning: symbol 'easycap_fops' was not declared. Should it be static?
easycap_main.c:82:29: warning: symbol 'easycap_vm_ops' was not declared. Should it be static?
easycap_main.c:87:25: warning: symbol 'easycap_class' was not declared. Should it be static?
easycap_main.c:95:35: warning: symbol 'v4l2_fops' was not declared. Should it be static?
easycap_main.c:5071:1: warning: symbol 'easycap_module_init' was not declared. Should it be static?
easycap_main.c:5101:1: warning: symbol 'easycap_module_exit' was not declared. Should it be static?
easycap_low.c:45:50: warning: symbol 'stk1160configPAL' was not declared. Should it be static?
easycap_low.c:87:28: warning: symbol 'stk1160configNTSC' was not declared. Should it be static?
easycap_low.c:129:50: warning: symbol 'saa7113configPAL' was not declared. Should it be static?
easycap_low.c:187:28: warning: symbol 'saa7113configNTSC' was not declared. Should it be static?
easycap_ioctl.c:915:5: warning: symbol 'adjust_mute' was not declared. Should it be static?
easycap_settings.c:42:31: warning: symbol 'easycap_standard' was not declared. Should it be static?
easycap_settings.c:312:23: warning: symbol 'easycap_format' was not declared. Should it be static?
easycap_settings.c:607:23: warning: symbol 'easycap_control' was not declared. Should it be static?

Cc: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: default avatarTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 8cbe7ae6
...@@ -912,7 +912,7 @@ return -ENOENT; ...@@ -912,7 +912,7 @@ return -ENOENT;
* THE URB AND THE PIPELINE COLLAPSES IRRETRIEVABLY. BEWARE. * THE URB AND THE PIPELINE COLLAPSES IRRETRIEVABLY. BEWARE.
*/ */
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
int adjust_mute(struct easycap *peasycap, int value) static int adjust_mute(struct easycap *peasycap, int value)
{ {
int i1; int i1;
......
...@@ -42,7 +42,10 @@ ...@@ -42,7 +42,10 @@
#include "easycap_low.h" #include "easycap_low.h"
/*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/
const struct stk1160config { int reg; int set; } stk1160configPAL[256] = { static const struct stk1160config {
int reg;
int set;
} stk1160configPAL[256] = {
{0x000, 0x0098}, {0x000, 0x0098},
{0x002, 0x0093}, {0x002, 0x0093},
...@@ -84,7 +87,7 @@ const struct stk1160config { int reg; int set; } stk1160configPAL[256] = { ...@@ -84,7 +87,7 @@ const struct stk1160config { int reg; int set; } stk1160configPAL[256] = {
{0xFFF, 0xFFFF} {0xFFF, 0xFFFF}
}; };
/*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/
const struct stk1160config stk1160configNTSC[256] = { static const struct stk1160config stk1160configNTSC[256] = {
{0x000, 0x0098}, {0x000, 0x0098},
{0x002, 0x0093}, {0x002, 0x0093},
...@@ -126,7 +129,10 @@ const struct stk1160config stk1160configNTSC[256] = { ...@@ -126,7 +129,10 @@ const struct stk1160config stk1160configNTSC[256] = {
{0xFFF, 0xFFFF} {0xFFF, 0xFFFF}
}; };
/*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/
const struct saa7113config { int reg; int set; } saa7113configPAL[256] = { static const struct saa7113config{
int reg;
int set;
} saa7113configPAL[256] = {
{0x01, 0x08}, {0x01, 0x08},
#if defined(ANTIALIAS) #if defined(ANTIALIAS)
{0x02, 0xC0}, {0x02, 0xC0},
...@@ -184,7 +190,7 @@ const struct saa7113config { int reg; int set; } saa7113configPAL[256] = { ...@@ -184,7 +190,7 @@ const struct saa7113config { int reg; int set; } saa7113configPAL[256] = {
{0xFF, 0xFF} {0xFF, 0xFF}
}; };
/*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/
const struct saa7113config saa7113configNTSC[256] = { static const struct saa7113config saa7113configNTSC[256] = {
{0x01, 0x08}, {0x01, 0x08},
#if defined(ANTIALIAS) #if defined(ANTIALIAS)
{0x02, 0xC0}, {0x02, 0xC0},
......
...@@ -46,7 +46,7 @@ static struct mutex mutex_dongle; ...@@ -46,7 +46,7 @@ static struct mutex mutex_dongle;
* PARAMETERS APPLICABLE TO ENTIRE DRIVER, I.E. BOTH VIDEO AND AUDIO * PARAMETERS APPLICABLE TO ENTIRE DRIVER, I.E. BOTH VIDEO AND AUDIO
*/ */
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
struct usb_device_id easycap_usb_device_id_table[] = { static struct usb_device_id easycap_usb_device_id_table[] = {
{ USB_DEVICE(USB_EASYCAP_VENDOR_ID, USB_EASYCAP_PRODUCT_ID) }, { USB_DEVICE(USB_EASYCAP_VENDOR_ID, USB_EASYCAP_PRODUCT_ID) },
{ } { }
}; };
...@@ -66,7 +66,7 @@ struct usb_driver easycap_usb_driver = { ...@@ -66,7 +66,7 @@ struct usb_driver easycap_usb_driver = {
* THIS IS THE CASE FOR OpenSUSE. * THIS IS THE CASE FOR OpenSUSE.
*/ */
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
const struct file_operations easycap_fops = { static const struct file_operations easycap_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.open = easycap_open, .open = easycap_open,
.release = easycap_release, .release = easycap_release,
...@@ -79,12 +79,12 @@ const struct file_operations easycap_fops = { ...@@ -79,12 +79,12 @@ const struct file_operations easycap_fops = {
.mmap = easycap_mmap, .mmap = easycap_mmap,
.llseek = no_llseek, .llseek = no_llseek,
}; };
struct vm_operations_struct easycap_vm_ops = { static const struct vm_operations_struct easycap_vm_ops = {
.open = easycap_vma_open, .open = easycap_vma_open,
.close = easycap_vma_close, .close = easycap_vma_close,
.fault = easycap_vma_fault, .fault = easycap_vma_fault,
}; };
struct usb_class_driver easycap_class = { static const struct usb_class_driver easycap_class = {
.name = "usb/easycap%d", .name = "usb/easycap%d",
.fops = &easycap_fops, .fops = &easycap_fops,
.minor_base = USB_SKEL_MINOR_BASE, .minor_base = USB_SKEL_MINOR_BASE,
...@@ -92,7 +92,7 @@ struct usb_class_driver easycap_class = { ...@@ -92,7 +92,7 @@ struct usb_class_driver easycap_class = {
/*vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /*vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/
#if defined(EASYCAP_IS_VIDEODEV_CLIENT) #if defined(EASYCAP_IS_VIDEODEV_CLIENT)
#if defined(EASYCAP_NEEDS_V4L2_FOPS) #if defined(EASYCAP_NEEDS_V4L2_FOPS)
const struct v4l2_file_operations v4l2_fops = { static const struct v4l2_file_operations v4l2_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.open = easycap_open_noinode, .open = easycap_open_noinode,
.release = easycap_release_noinode, .release = easycap_release_noinode,
...@@ -5067,8 +5067,7 @@ JOM(4, "ends\n"); ...@@ -5067,8 +5067,7 @@ JOM(4, "ends\n");
return; return;
} }
/*****************************************************************************/ /*****************************************************************************/
int __init static int __init easycap_module_init(void)
easycap_module_init(void)
{ {
int k, rc; int k, rc;
...@@ -5097,8 +5096,7 @@ JOT(4, "ends\n"); ...@@ -5097,8 +5096,7 @@ JOT(4, "ends\n");
return rc; return rc;
} }
/*****************************************************************************/ /*****************************************************************************/
void __exit static void __exit easycap_module_exit(void)
easycap_module_exit(void)
{ {
JOT(4, "begins\n"); JOT(4, "begins\n");
......
...@@ -31,6 +31,7 @@ extern struct easycap_standard easycap_standard[]; ...@@ -31,6 +31,7 @@ extern struct easycap_standard easycap_standard[];
extern struct easycap_format easycap_format[]; extern struct easycap_format easycap_format[];
extern struct v4l2_queryctrl easycap_control[]; extern struct v4l2_queryctrl easycap_control[];
extern struct usb_driver easycap_usb_driver; extern struct usb_driver easycap_usb_driver;
extern struct easycap_dongle easycapdc60_dongle[];
#if defined(EASYCAP_NEEDS_ALSA) #if defined(EASYCAP_NEEDS_ALSA)
extern struct snd_pcm_ops easycap_alsa_ops; extern struct snd_pcm_ops easycap_alsa_ops;
extern struct snd_pcm_hardware easycap_pcm_hardware; extern struct snd_pcm_hardware easycap_pcm_hardware;
......
...@@ -27,6 +27,9 @@ ...@@ -27,6 +27,9 @@
#if !defined(EASYCAP_SETTINGS_H) #if !defined(EASYCAP_SETTINGS_H)
#define EASYCAP_SETTINGS_H #define EASYCAP_SETTINGS_H
extern const struct easycap_standard easycap_standard[];
extern struct v4l2_queryctrl easycap_control[];
extern struct easycap_format easycap_format[];
extern struct easycap_dongle easycapdc60_dongle[]; extern struct easycap_dongle easycapdc60_dongle[];
#endif /*EASYCAP_SETTINGS_H*/ #endif /*EASYCAP_SETTINGS_H*/
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment