2008-07-21 19:34:48

by Adrian Bunk

[permalink] [raw]
Subject: [2.6 patch] dvb/siano/: cleanups

This patch contains the following cleanups:
- mark smscore_module_init() as __init
- mark smscore_module_exit as __exit
- make the following needlessly global code static:
- smscoreapi.c: struct g_smscore_notifyees
- smscoreapi.c: struct g_smscore_devices
- smscoreapi.c: struct g_smscore_deviceslock
- smscoreapi.c: struct g_smscore_registry
- smscoreapi.c: struct g_smscore_registrylock
- smscoreapi.c: smscore_module_init()
- smscoreapi.c: smscore_module_exit()
- smsdvb.c: struct g_smsdvb_clients
- smsdvb.c: struct g_smsdvb_clientslock

Signed-off-by: Adrian Bunk <[email protected]>

---

drivers/media/dvb/siano/smscoreapi.c | 14 +++++++-------
drivers/media/dvb/siano/smsdvb.c | 4 ++--
2 files changed, 9 insertions(+), 9 deletions(-)

0a5990e3265d7a29ced7effd8d33686169502315
diff --git a/drivers/media/dvb/siano/smscoreapi.c b/drivers/media/dvb/siano/smscoreapi.c
index b4b8ed7..c5f45fe 100644
--- a/drivers/media/dvb/siano/smscoreapi.c
+++ b/drivers/media/dvb/siano/smscoreapi.c
@@ -110,12 +110,12 @@ struct smscore_registry_entry_t {
enum sms_device_type_st type;
};

-struct list_head g_smscore_notifyees;
-struct list_head g_smscore_devices;
-struct mutex g_smscore_deviceslock;
+static struct list_head g_smscore_notifyees;
+static struct list_head g_smscore_devices;
+static struct mutex g_smscore_deviceslock;

-struct list_head g_smscore_registry;
-struct mutex g_smscore_registrylock;
+static struct list_head g_smscore_registry;
+static struct mutex g_smscore_registrylock;

static int default_mode = 4;

@@ -1187,7 +1187,7 @@ int smsclient_sendrequest(struct smscore_client_t *client,
}


-int smscore_module_init(void)
+static int __init smscore_module_init(void)
{
int rc = 0;

@@ -1209,7 +1209,7 @@ int smscore_module_init(void)
return rc;
}

-void smscore_module_exit(void)
+static void __exit smscore_module_exit(void)
{

kmutex_lock(&g_smscore_deviceslock);
diff --git a/drivers/media/dvb/siano/smsdvb.c b/drivers/media/dvb/siano/smsdvb.c
index 6f9c185..229274a 100644
--- a/drivers/media/dvb/siano/smsdvb.c
+++ b/drivers/media/dvb/siano/smsdvb.c
@@ -27,8 +27,8 @@

DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);

-struct list_head g_smsdvb_clients;
-struct mutex g_smsdvb_clientslock;
+static struct list_head g_smsdvb_clients;
+static struct mutex g_smsdvb_clientslock;

static int smsdvb_onresponse(void *context, struct smscore_buffer_t *cb)
{


2008-07-22 02:21:35

by Michael Ira Krufky

[permalink] [raw]
Subject: Re: [2.6 patch] dvb/siano/: cleanups

Mauro,

Please see my pull request, below.

Adrian Bunk wrote:
> This patch contains the following cleanups:
> - mark smscore_module_init() as __init
> - mark smscore_module_exit as __exit
> - make the following needlessly global code static:
> - smscoreapi.c: struct g_smscore_notifyees
> - smscoreapi.c: struct g_smscore_devices
> - smscoreapi.c: struct g_smscore_deviceslock
> - smscoreapi.c: struct g_smscore_registry
> - smscoreapi.c: struct g_smscore_registrylock
> - smscoreapi.c: smscore_module_init()
> - smscoreapi.c: smscore_module_exit()
> - smsdvb.c: struct g_smsdvb_clients
> - smsdvb.c: struct g_smsdvb_clientslock
>
> Signed-off-by: Adrian Bunk <[email protected]>
>
> ---
>
> drivers/media/dvb/siano/smscoreapi.c | 14 +++++++-------
> drivers/media/dvb/siano/smsdvb.c | 4 ++--
> 2 files changed, 9 insertions(+), 9 deletions(-)
>
Thank you for this, Adrian. I've pushed this into my tree.

Mauro,

Please pull from:

http://linuxtv.org/hg/~mkrufky/sms1xxx

for:

- sms1xxx: dvb/siano/: cleanups

smscoreapi.c | 14 +++++++-------
smsdvb.c | 4 ++--
2 files changed, 9 insertions(+), 9 deletions(-)

Regards,

Mike