linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] acerhdf: make needlessly global symbols static
@ 2010-07-08  1:46 Axel Lin
  2010-07-08  9:08 ` Borislav Petkov
  0 siblings, 1 reply; 3+ messages in thread
From: Axel Lin @ 2010-07-08  1:46 UTC (permalink / raw)
  To: linux-kernel
  Cc: Peter Feuerer, Matthew Garrett, Andrew Morton, Borislav Petkov,
	Alexey Dobriyan, platform-driver-x86

The following symbols are needlessly defined global:

thz_dev
cl_dev
acerhdf_dev
acerhdf_dev_ops
acerhdf_cooling_ops

This patch makes the symbols static.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 drivers/platform/x86/acerhdf.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/platform/x86/acerhdf.c b/drivers/platform/x86/acerhdf.c
index 7b2384d..5caaaf0 100644
--- a/drivers/platform/x86/acerhdf.c
+++ b/drivers/platform/x86/acerhdf.c
@@ -92,9 +92,9 @@ static unsigned int fanstate = ACERHDF_FAN_AUTO;
 static char force_bios[16];
 static char force_product[16];
 static unsigned int prev_interval;
-struct thermal_zone_device *thz_dev;
-struct thermal_cooling_device *cl_dev;
-struct platform_device *acerhdf_dev;
+static struct thermal_zone_device *thz_dev;
+static struct thermal_cooling_device *cl_dev;
+static struct platform_device *acerhdf_dev;
 
 module_param(kernelmode, uint, 0);
 MODULE_PARM_DESC(kernelmode, "Kernel mode fan control on / off");
@@ -374,7 +374,7 @@ static int acerhdf_get_crit_temp(struct thermal_zone_device *thermal,
 }
 
 /* bind callback functions to thermalzone */
-struct thermal_zone_device_ops acerhdf_dev_ops = {
+static struct thermal_zone_device_ops acerhdf_dev_ops = {
 	.bind = acerhdf_bind,
 	.unbind = acerhdf_unbind,
 	.get_temp = acerhdf_get_ec_temp,
@@ -449,7 +449,7 @@ err_out:
 }
 
 /* bind fan callbacks to fan device */
-struct thermal_cooling_device_ops acerhdf_cooling_ops = {
+static struct thermal_cooling_device_ops acerhdf_cooling_ops = {
 	.get_max_state = acerhdf_get_max_state,
 	.get_cur_state = acerhdf_get_cur_state,
 	.set_cur_state = acerhdf_set_cur_state,
-- 
1.5.4.3




^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] acerhdf: make needlessly global symbols static
  2010-07-08  1:46 [PATCH] acerhdf: make needlessly global symbols static Axel Lin
@ 2010-07-08  9:08 ` Borislav Petkov
  2010-07-10 17:42   ` Peter Feuerer
  0 siblings, 1 reply; 3+ messages in thread
From: Borislav Petkov @ 2010-07-08  9:08 UTC (permalink / raw)
  To: Axel Lin
  Cc: linux-kernel, Peter Feuerer, Matthew Garrett, Andrew Morton,
	Borislav Petkov, Alexey Dobriyan, platform-driver-x86

From: Axel Lin <axel.lin@gmail.com>
Date: Thu, Jul 08, 2010 at 09:46:20AM +0800

> The following symbols are needlessly defined global:
> 
> thz_dev
> cl_dev
> acerhdf_dev
> acerhdf_dev_ops
> acerhdf_cooling_ops
> 
> This patch makes the symbols static.
> 
> Signed-off-by: Axel Lin <axel.lin@gmail.com>

Acked-by: Borislav Petkov <bp@alien8.de>

> ---
>  drivers/platform/x86/acerhdf.c |   10 +++++-----
>  1 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/platform/x86/acerhdf.c b/drivers/platform/x86/acerhdf.c
> index 7b2384d..5caaaf0 100644
> --- a/drivers/platform/x86/acerhdf.c
> +++ b/drivers/platform/x86/acerhdf.c
> @@ -92,9 +92,9 @@ static unsigned int fanstate = ACERHDF_FAN_AUTO;
>  static char force_bios[16];
>  static char force_product[16];
>  static unsigned int prev_interval;
> -struct thermal_zone_device *thz_dev;
> -struct thermal_cooling_device *cl_dev;
> -struct platform_device *acerhdf_dev;
> +static struct thermal_zone_device *thz_dev;
> +static struct thermal_cooling_device *cl_dev;
> +static struct platform_device *acerhdf_dev;
>  
>  module_param(kernelmode, uint, 0);
>  MODULE_PARM_DESC(kernelmode, "Kernel mode fan control on / off");
> @@ -374,7 +374,7 @@ static int acerhdf_get_crit_temp(struct thermal_zone_device *thermal,
>  }
>  
>  /* bind callback functions to thermalzone */
> -struct thermal_zone_device_ops acerhdf_dev_ops = {
> +static struct thermal_zone_device_ops acerhdf_dev_ops = {
>  	.bind = acerhdf_bind,
>  	.unbind = acerhdf_unbind,
>  	.get_temp = acerhdf_get_ec_temp,
> @@ -449,7 +449,7 @@ err_out:
>  }
>  
>  /* bind fan callbacks to fan device */
> -struct thermal_cooling_device_ops acerhdf_cooling_ops = {
> +static struct thermal_cooling_device_ops acerhdf_cooling_ops = {
>  	.get_max_state = acerhdf_get_max_state,
>  	.get_cur_state = acerhdf_get_cur_state,
>  	.set_cur_state = acerhdf_set_cur_state,
> -- 
> 1.5.4.3
> 
> 
> 

-- 
Regards/Gruss,
Boris.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] acerhdf: make needlessly global symbols static
  2010-07-08  9:08 ` Borislav Petkov
@ 2010-07-10 17:42   ` Peter Feuerer
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Feuerer @ 2010-07-10 17:42 UTC (permalink / raw)
  To: Borislav Petkov
  Cc: Axel Lin, linux-kernel, Matthew Garrett, Andrew Morton,
	Borislav Petkov, Alexey Dobriyan, platform-driver-x86

Borislav Petkov writes:

> From: Axel Lin <axel.lin@gmail.com>
> Date: Thu, Jul 08, 2010 at 09:46:20AM +0800
> 
>> The following symbols are needlessly defined global:
>> 
>> thz_dev
>> cl_dev
>> acerhdf_dev
>> acerhdf_dev_ops
>> acerhdf_cooling_ops
>> 
>> This patch makes the symbols static.
>> 
>> Signed-off-by: Axel Lin <axel.lin@gmail.com>
> 
> Acked-by: Borislav Petkov <bp@alien8.de>

Acked-by: Peter Feuerer <peter@piie.net>

> 
>> ---
>>  drivers/platform/x86/acerhdf.c |   10 +++++-----
>>  1 files changed, 5 insertions(+), 5 deletions(-)
>> 
>> diff --git a/drivers/platform/x86/acerhdf.c b/drivers/platform/x86/acerhdf.c
>> index 7b2384d..5caaaf0 100644
>> --- a/drivers/platform/x86/acerhdf.c
>> +++ b/drivers/platform/x86/acerhdf.c
>> @@ -92,9 +92,9 @@ static unsigned int fanstate = ACERHDF_FAN_AUTO;
>>  static char force_bios[16];
>>  static char force_product[16];
>>  static unsigned int prev_interval;
>> -struct thermal_zone_device *thz_dev;
>> -struct thermal_cooling_device *cl_dev;
>> -struct platform_device *acerhdf_dev;
>> +static struct thermal_zone_device *thz_dev;
>> +static struct thermal_cooling_device *cl_dev;
>> +static struct platform_device *acerhdf_dev;
>>  
>>  module_param(kernelmode, uint, 0);
>>  MODULE_PARM_DESC(kernelmode, "Kernel mode fan control on / off");
>> @@ -374,7 +374,7 @@ static int acerhdf_get_crit_temp(struct thermal_zone_device *thermal,
>>  }
>>  
>>  /* bind callback functions to thermalzone */
>> -struct thermal_zone_device_ops acerhdf_dev_ops = {
>> +static struct thermal_zone_device_ops acerhdf_dev_ops = {
>>  	.bind = acerhdf_bind,
>>  	.unbind = acerhdf_unbind,
>>  	.get_temp = acerhdf_get_ec_temp,
>> @@ -449,7 +449,7 @@ err_out:
>>  }
>>  
>>  /* bind fan callbacks to fan device */
>> -struct thermal_cooling_device_ops acerhdf_cooling_ops = {
>> +static struct thermal_cooling_device_ops acerhdf_cooling_ops = {
>>  	.get_max_state = acerhdf_get_max_state,
>>  	.get_cur_state = acerhdf_get_cur_state,
>>  	.set_cur_state = acerhdf_set_cur_state,
>> -- 
>> 1.5.4.3
>> 
>> 
>> 

thanks and kind regards,
--peter;

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-07-10 17:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-08  1:46 [PATCH] acerhdf: make needlessly global symbols static Axel Lin
2010-07-08  9:08 ` Borislav Petkov
2010-07-10 17:42   ` Peter Feuerer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).