Use the attribute groups of the led-class to create the blink attribute
during probe in order to avoid racing with userspace.
Signed-off-by: Johan Hovold <[email protected]>
Signed-off-by: Bryan Wu <[email protected]>
Remove __initdata marker, because it is not right for a module
parameter. It will make the kernel oops problem.
([email protected]: update commit message since it's really a
wrong notation)
Signed-off-by: Jingoo Han <[email protected]>
Signed-off-by: Bryan Wu <[email protected]>
Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro
is deprecated.
Signed-off-by: Jingoo Han <[email protected]>
Signed-off-by: Bryan Wu <[email protected]>
__initdata should be placed between the variable name and equal
sign for the variable to be placed in the intended section.
Signed-off-by: Sachin Kamat <[email protected]>
Cc: Dave Hansen <[email protected]>
Signed-off-by: Bryan Wu <[email protected]>
nasgpio_led_get_attr() is used only in this file.
Fix the following sparse warning:
drivers/leds/leds-ss4200.c:200:5: warning: symbol 'nasgpio_led_get_attr' was not declared. Should it be static?
Signed-off-by: Jingoo Han <[email protected]>
Signed-off-by: Bryan Wu <[email protected]>
The usage of strict_strtoul() is not preferred, because
strict_strtoul() is obsolete. Thus, kstrtoul() should be
used.
Signed-off-by: Jingoo Han <[email protected]>
Signed-off-by: Bryan Wu <[email protected]>
module_param(bool) used to counter-intuitively take an int. In
fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy
trick.
It's time to remove the int/unsigned int option. For this version
it'll simply give a warning, but it'll break next kernel version.
Acked-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: Rusty Russell <[email protected]>
In current implementation, if device_create_file failed in register_nasgpio_led,
led_classdev_unregister will be executed twice.
( in register_nasgpio_led it calls led_classdev_unregister before return and in nas_gpio_init out_err )
This patch fixes it by only unregistering those that were successfully registered in out_err.
( not including last failed register_nasgpio_led call )
Signed-off-by: Axel Lin <[email protected]>
Acked-by: Dave Hansen <[email protected]>
Signed-off-by: Richard Purdie <[email protected]>
The id_table field of the struct pci_driver is constant in <linux/pci.h>
so it is worth to make pci_device_id also constant.
The semantic match that finds this kind of pattern is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@r@
disable decl_init,const_decl_init;
identifier I1, I2, x;
@@
struct I1 {
...
const struct I2 *x;
...
};
@s@
identifier r.I1, y;
identifier r.x, E;
@@
struct I1 y = {
.x = E,
};
@c@
identifier r.I2;
identifier s.E;
@@
const struct I2 E[] = ... ;
@depends on !c@
identifier r.I2;
identifier s.E;
@@
+ const
struct I2 E[] = ...;
// </smpl>
Signed-off-by: Márton Németh <[email protected]>
Signed-off-by: Richard Purdie <[email protected]>
drivers/leds/leds-ss4200.c: In function 'ich7_lpc_probe':
drivers/leds/leds-ss4200.c:353: warning: 'return' with no value, in function returning non-void
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Richard Purdie <[email protected]>
pci_enable_result is defined using the __must_check macro but
leds-ss4200 is not checking the return value.
Signed-off-by: Javier Martinez Canillas <[email protected]>
Signed-off-by: Dave Hansen <[email protected]>
Signed-off-by: Richard Purdie <[email protected]>
This code is based on a driver that came in the "Open-source
and GPL components" download here:
http://downloadcenter.intel.com/SearchResult.aspx?lang=eng&ProductFamily=Server+Products&ProductLine=Intel%C2%AE+Storage+Systems&ProductProduct=Intel%C2%AE+Entry+Storage+System+SS4200-E&OSVersion=OS+Independent
It was in a file called nasgpio.c inside of a second zip file
called SS4200-E_Linux_SIO_Driver-v1.4.zip and is based on this
updated to use the LED subsystem with the ioctl and hardware
monitor support removed.
I don't have any need for brightness
control, and its code is *completely* separate from the on/off
controls implemented here. If anyone else wants it, I'd be
happy to look into adding it, but I don't care enough for now.
Except for the probe routines, I rewrote most of it. I also
Note that I don't have any hardware documentation except for
the original driver.
Thanks go to Arjan for his help in getting the original source
for this released and for chasing down some licensing issues.
Signed-off-by: Dave Hansen <[email protected]>
Signed-off-by: Richard Purdie <[email protected]>