summaryrefslogtreecommitdiffstats
path: root/drivers/leds/leds-ss4200.c
AgeCommit message (Collapse)Author
2010-05-26leds: leds-ss4200: fix led_classdev_unregister twice in error handlingAxel Lin
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 <axel.lin@gmail.com> Acked-by: Dave Hansen <dave@sr71.net> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-03-16leds: make PCI device id constantMárton Németh
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 <nm127@freemail.hu> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-12-17leds: drivers/leds/leds-ss4200.c: fix return statementakpm@linux-foundation.org
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 <akpm@linux-foundation.org> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-12-16leds-ss4200: Check pci_enable_device returnDave Hansen
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 <martinez.javier@gmail.com> Signed-off-by: Dave Hansen <dave@sr71.net> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-12-16leds: LED driver for Intel NAS SS4200 series (v5)Dave Hansen
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 <dave@sr71.net> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>