summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* hwmon: convert drivers/hwmon/* to use module_i2c_driver()Axel Lin2012-03-1874-909/+74
| | | | | | | | | | | | | | | | | | This patch converts the drivers in drivers/hwmon/* to use the module_i2c_driver() macro which makes the code smaller and a bit simpler. Signed-off-by: Axel Lin <axel.lin@gmail.com> Cc: Corentin Labbe <corentin.labbe@geomatys.fr> Cc: Dirk Eibach <eibach@gdsys.de> Cc: "Mark M. Hoffman" <mhoffman@lightlink.com> Cc: Steve Glendinning <steve.glendinning@smsc.com> Cc: Riku Voipio <riku.voipio@iki.fi> Cc: Guillaume Ligneul <guillaume.ligneul@gmail.com> Cc: David George <david.george@ska.ac.za> Cc: "Hans J. Koch" <hjk@hansjkoch.de> Cc: Marc Hulsman <m.hulsman@tudelft.nl> Cc: Rudolf Marek <r.marek@assembler.cz> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
* hwmon: (vt8231) Fix multi-line commentsGuenter Roeck2012-03-181-77/+87
| | | | | | Cc: Roger Lucas <vt8231@hiddenengine.co.uk> Acked-by: Roger Lucas <vt8231@hiddenengine.co.uk> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (adt7475) Fix multi-line commentsGuenter Roeck2012-03-181-32/+58
| | | | | | Cc: Jean Delvare <khali@linux-fr.org> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (f71805f) Fix checkpatch issuesGuenter Roeck2012-03-181-51/+136
| | | | | | | | | | | | | | | | | Fixed: ERROR: code indent should use tabs where possible ERROR: do not use assignment in if condition ERROR: "foo* bar" should be "foo *bar" ERROR: need consistent spacing around '|' (ctx:VxW) WARNING: simple_strtol is obsolete, use kstrtol instead WARNING: simple_strtoul is obsolete, use kstrtoul instead WARNING: static const char * array should probably be static const char * const Also modified multi-line comments to follow Documents/Codingstyle. Cc: Jean Delvare <khali@linux-fr.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
* hwmon: (max6650) Fix multi-line commentsGuenter Roeck2012-03-181-23/+28
| | | | | | Cc: Hans J. Koch <hjk@hansjkoch.de> Acked-by: Hans J. Koch <hjk@hansjkoch.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (w83781d) Fix checkpatch issuesGuenter Roeck2012-03-181-54/+92
| | | | | | | | | | | | | | | | | | | | | | | | Fixed: ERROR: code indent should use tabs where possible ERROR: do not use assignment in if condition ERROR: "foo* bar" should be "foo *bar" ERROR: space prohibited after that open parenthesis '(' ERROR: space required after that ',' (ctx:VxV) ERROR: spaces required around that '==' (ctx:VxV) WARNING: line over 80 characters WARNING: simple_strtol is obsolete, use kstrtol instead WARNING: simple_strtoul is obsolete, use kstrtoul instead WARNING: space prohibited between function name and open parenthesis '(' Not fixed (false positive): ERROR: Macros with multiple statements should be enclosed in a do - while loop ERROR: Macros with complex values should be enclosed in parenthesis Not all fixed (code complexity): ERROR: do not use assignment in if condition Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (adm1025) Fix checkpatch issuesGuenter Roeck2012-03-181-17/+46
| | | | | | | | | | | | | | | | | Fixed: ERROR: do not use assignment in if condition ERROR: space required after that ',' (ctx:VxV) ERROR: spaces required around that '<' (ctx:VxV) ERROR: spaces required around that '=' (ctx:VxV) ERROR: trailing whitespace WARNING: simple_strtol is obsolete, use kstrtol instead WARNING: simple_strtoul is obsolete, use kstrtoul instead Not fixed: ERROR: Macros with multiple statements should be enclosed in a do - while loop Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (abituguru3) Fix checkpatch issuesGuenter Roeck2012-03-181-21/+35
| | | | | | | | | | | | | | Fixed: ERROR: do not use assignment in if condition ERROR: "foo* bar" should be "foo *bar" WARNING: line over 80 characters Not fixed: WARNING: msleep < 20ms can sleep for up to 20ms Cc: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Robert Coulson <robert.coulson@ericsson.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (vt8231) Fix checkpatch issuesGuenter Roeck2012-03-181-33/+94
| | | | | | | | | | | | | | | | | | | Fixed: ERROR: code indent should use tabs where possible ERROR: do not use assignment in if condition ERROR: trailing statements should be on next line WARNING: braces {} are not necessary for any arm of this statement WARNING: line over 80 characters WARNING: please, no space before tabs WARNING: simple_strtol is obsolete, use kstrtol instead WARNING: simple_strtoul is obsolete, use kstrtoul instead Not fixed (false positive): ERROR: Macros with multiple statements should be enclosed in a do - while loop Cc: Roger Lucas <vt8231@hiddenengine.co.uk> Acked-by: Roger Lucas <vt8231@hiddenengine.co.uk> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (max6650) Fix checkpatch issuesGuenter Roeck2012-03-181-50/+63
| | | | | | | | | | | | | Fixed: ERROR: do not use assignment in if condition ERROR: open brace '{' following struct go on the same line ERROR: spaces required around that '||' (ctx:VxV) ERROR: switch and case should be at the same indent WARNING: simple_strtoul is obsolete, use kstrtoul instead Cc: Hans J. Koch <hjk@hansjkoch.de> Acked-by: Hans J. Koch <hjk@hansjkoch.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (pmbus) Replace strict_strtol with kstrtolGuenter Roeck2012-03-181-1/+1
| | | | | | | | strict_strtol is deprecated and results in a checkpatch warning. Replace it with kstrtol. Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
* hwmon: (lm83) fix checkpatch issuesFrans Meulenbroeks2012-03-181-5/+12
| | | | | | | | | | | resolved: ERROR: trailing whitespace WARNING: please, no spaces at the start of a line WARNING: simple_strtol is obsolete, use kstrtol instead ERROR: do not use assignment in if condition Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
* hwmon: (k8temp) fix checkpatch issuesFrans Meulenbroeks2012-03-181-7/+8
| | | | | | | | | resolved: WARNING: line over 80 characters ERROR: do not use assignment in if condition Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
* hwmon: (lm80) reset device if error occurredFrans Meulenbroeks2012-03-181-0/+6
| | | | | | | | | If an error occurs while updating (e.g. because the chip was disconnected) the device needs to be reinitialized in order to get back to 11 bit temperature and set the fan divider. Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
* hwmon: (lm80) fix checkpatch warningsFrans Meulenbroeks2012-03-181-4/+16
| | | | | | | | | | fix: WARNING: simple_strtol is obsolete, use kstrtol instead WARNING: simple_strtoul is obsolete, use kstrtoul instead Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> [guenter.roeck@ericsson.com: kstrtol->kstrtoul where appropriate] Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
* hwmon: (adt7470) fix checkpatch issuesFrans Meulenbroeks2012-03-181-3/+3
| | | | | | | | | | | | | | | fixed: ERROR: that open brace { should be on the previous line #1135: FILE: adt7470.c:1135: +static struct attribute *adt7470_attr[] = +{ ERROR: do not use assignment in if condition #1279: FILE: adt7470.c:1279: + if ((err = sysfs_create_group(&client->dev.kobj, &data->attrs))) Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
* hwmon: (adt7411) fix checkpatch issuesFrans Meulenbroeks2012-03-181-1/+1
| | | | | | | | | | | | | | | fixed: WARNING: please, no space before tabs #11: FILE: adt7411.c:11: + * ^I use power-down mode for suspend?, interrupt handling?$ not fixed as all other macros around it are the same structure and this one is only 2 chars longer: WARNING: line over 80 characters #229: FILE: adt7411.c:229: +static ADT7411_BIT_ATTR(fast_sampling, ADT7411_REG_CFG3, ADT7411_CFG3_ADC_CLK_225); Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
* hwmon: (lm70) fix checkpatch issuesFrans Meulenbroeks2012-03-181-1/+1
| | | | | | | | | | | | | | | fixed: ERROR: spaces required around that '=' (ctx:VxV) #60: FILE: lm70.c:60: + s16 raw=0; ^ ERROR: do not use assignment in if condition #168: FILE: lm70.c:168: + if ((status = device_create_file(&spi->dev, &dev_attr_temp1_input)) Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
* hwmon: (f71882fg) fix checkpatch issuesFrans Meulenbroeks2012-03-181-2/+2
| | | | | | | | | fixed: WARNING: static const char * array should probably be static const char * const +static const char *f71882fg_names[] = { Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
* hwmon: (asus_atk0110) fix checkpatch issuesFrans Meulenbroeks2012-03-181-1/+2
| | | | | | | | | | fixed: WARNING: line over 80 characters #1321: FILE: asus_atk0110.c:1321: + if (data->rtmp_handle && data->rvlt_handle && data->rfan_handle && !new_if) Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
* hwmon: (adt7475) fix checkpatch issuesFrans Meulenbroeks2012-03-181-1/+1
| | | | | | | | | fixed: WARNING: static const char * array should probably be static const char * const + static const char *names[] = { Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
* hwmon: (smm665) fix checkpatch issuesFrans Meulenbroeks2012-03-181-1/+1
| | | | | | | | | | fixed: WARNING: please, no spaces at the start of a line #379: FILE: smm665.c:379: + static ssize_t smm665_show_##what(struct device *dev, \$ Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
* hwmon: (sht15) fix checkpatch issuesFrans Meulenbroeks2012-03-181-1/+1
| | | | | | | | | | fixed: WARNING: line over 80 characters #809: FILE: sht15.c:809: + /* If still not occurred or another handler has been scheduled */ Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
* hwmon: (ibmaem) fix checkpatch issuesFrans Meulenbroeks2012-03-181-1/+1
| | | | | | | | | | fixed: WARNING: please, no space before tabs +{"power3_average", ^I aem2_show_pcap_value,^IPOWER_AUX},$ Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Acked-by: Darrick J. Wong <djwong@us.ibm.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
* hwmon: (ad7414) fix checkpatch issuesFrans Meulenbroeks2012-03-181-1/+5
| | | | | | | | | | fixed: WARNING: simple_strtol is obsolete, use kstrtol instead #133: FILE: ad7414.c:133: + long temp = simple_strtol(buf, NULL, 10); Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
* hwmon: (ad7418) fix checkpatch issuesFrans Meulenbroeks2012-03-181-3/+9
| | | | | | | | | | | | | | | fixed: WARNING: simple_strtol is obsolete, use kstrtol instead + long temp = simple_strtol(buf, NULL, 10); ERROR: do not use assignment in if condition + if (!(data = kzalloc(sizeof(struct ad7418_data), GFP_KERNEL))) { ERROR: do not use assignment in if condition + if ((err = sysfs_create_group(&client->dev.kobj, &data->attrs))) Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
* hwmon: (w83l785ts) fix checkpatch issuesFrans Meulenbroeks2012-03-181-1/+1
| | | | | | | | | | | | | | | | fixed: ERROR: trailing whitespace + $ WARNING: please, no spaces at the start of a line + $ not fixed (did not want to break url): WARNING: line over 80 characters + * http://www.winbond-usa.com/products/winbond_products/pdfs/PCIC/W83L785TS-S.pdf Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
* hwmon: (wm831x-hwmon) fix checkpatch issuesFrans Meulenbroeks2012-03-181-1/+1
| | | | | | | | | | | | | | | | fixed: WARNING: static const char * array should probably be static const char * const +static const char *input_names[] = { not fixed (will probably provide separate fix later) ERROR: Macros with multiple statements should be enclosed in a do - while loop +#define WM831X_NAMED_VOLTAGE(id, name) \ + WM831X_VOLTAGE(id, name); \ + static SENSOR_DEVICE_ATTR(in##id##_label, S_IRUGO, show_label, \ + NULL, name) Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
* hwmon: fix checkpatch issuesFrans Meulenbroeks2012-03-181-3/+2
| | | | | | | | | | | | fixed: WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable +EXPORT_SYMBOL_GPL(hwmon_device_register); WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable +EXPORT_SYMBOL_GPL(hwmon_device_unregister); Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
* hwmon: (adm1029) fix checkpatch issuesFrans Meulenbroeks2012-03-181-3/+7
| | | | | | | | | | | | | | | fixed: ERROR: space prohibited after that open parenthesis '(' +#define DIV_FROM_REG(val) ( 1 << (((val) >> 6) - 1)) WARNING: simple_strtol is obsolete, use kstrtol instead + long val = simple_strtol(buf, NULL, 10); ERROR: do not use assignment in if condition + if ((err = sysfs_create_group(&client->dev.kobj, &adm1029_group))) Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
* hwmon: (g760a) fix checkpatch issuesFrans Meulenbroeks2012-03-181-2/+2
| | | | | | | | | | | | fixed: ERROR: code indent should use tabs where possible + fan speed PWM controller chip$ ERROR: trailing whitespace + http://www.gmt.com.tw/product/datasheet/EDS-760A.pdf $ Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
* hwmon: (i5k_amb) fix checkpatch issuesFrans Meulenbroeks2012-03-181-3/+15
| | | | | | | | | | | | | | | | fixed: WARNING: simple_strtoul is obsolete, use kstrtoul instead + unsigned long temp = simple_strtoul(buf, NULL, 10) / 500; WARNING: simple_strtoul is obsolete, use kstrtoul instead + unsigned long temp = simple_strtoul(buf, NULL, 10) / 500; WARNING: simple_strtoul is obsolete, use kstrtoul instead + unsigned long temp = simple_strtoul(buf, NULL, 10) / 500; Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Acked-by: Darrick J. Wong <djwong@us.ibm.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
* hwmon: use DEFINE_PCI_DEVICE_TABLEFrans Meulenbroeks2012-03-185-5/+5
| | | | | | | fix all checkpatch warnings about DEFINE_PCI_DEVICE_TABLE Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
* hwmon: remove () used with returnFrans Meulenbroeks2012-03-188-32/+32
| | | | | | | | fix checkpatch ERROR: return is not a function, parentheses are not required Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
* hwmon: (amc6821) fix initialisationFrans Meulenbroeks2012-03-181-1/+1
| | | | | | | | fix checkpatch error: ERROR: do not initialise statics to 0 or NULL Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
* hwmon: (lm80) add error handlingFrans Meulenbroeks2012-03-181-31/+101
| | | | | | | | The LM80 driver currently does not return errors after I2C access failures. Add it. Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netLinus Torvalds2012-03-174-50/+39
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull networking changes from David Miller: "1) icmp6_dst_alloc() returns NULL instead of ERR_PTR() leading to crashes, particularly during shutdown. Reported by Dave Jones and fixed by Eric Dumazet. 2) hyperv and wimax/i2400m return NETDEV_TX_BUSY when they have already freed the SKB, which causes crashes as to the caller this means requeue the packet. Fixes from Eric Dumazet. 3) usbnet driver doesn't allocate the right amount of headroom on fresh RX SKBs, fix from Eric Dumazet. 4) Fix regression in ip6_mc_find_dev_rcu(), as an RCU lookup it abolutely should not take a reference to 'dev', this leads to leaks. Fix from RonQing Li. 5) Fix netfilter ctnetlink race between delete and timeout expiration. From Pablo Neira Ayuso. 6) Revert SFQ change which causes regressions, specifically queueing to tail can lead to unavoidable flow starvation. From Eric Dumazet. 7) Fix a memory leak and a crash on corrupt firmware files in bnx2x, from Michal Schmidt." * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: netfilter: ctnetlink: fix race between delete and timeout expiration ipv6: Don't dev_hold(dev) in ip6_mc_find_dev_rcu. wimax/i2400m: fix erroneous NETDEV_TX_BUSY use net/hyperv: fix erroneous NETDEV_TX_BUSY use net/usbnet: reserve headroom on rx skbs bnx2x: fix memory leak in bnx2x_init_firmware() bnx2x: fix a crash on corrupt firmware file sch_sfq: revert dont put new flow at the end of flows ipv6: fix icmp6_dst_alloc()
| * wimax/i2400m: fix erroneous NETDEV_TX_BUSY useEric Dumazet2012-03-161-20/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A driver start_xmit() method cannot free skb and return NETDEV_TX_BUSY, since caller is going to reuse freed skb. In fact netif_tx_stop_queue() / netif_stop_queue() is needed before returning NETDEV_TX_BUSY or you can trigger a ksoftirqd fatal loop. In case of memory allocation error, only safe way is to drop the packet and return NETDEV_TX_OK Also increments tx_dropped counter Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Cc: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net/hyperv: fix erroneous NETDEV_TX_BUSY useEric Dumazet2012-03-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A driver start_xmit() method cannot free skb and return NETDEV_TX_BUSY, since caller is going to reuse freed skb. This is mostly a revert of commit bf769375c (staging: hv: fix the return status of netvsc_start_xmit()) In fact netif_tx_stop_queue() / netif_stop_queue() is needed before returning NETDEV_TX_BUSY or you can trigger a ksoftirqd fatal loop. In case of memory allocation error, only safe way is to drop the packet and return NETDEV_TX_OK Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Cc: "K. Y. Srinivasan" <kys@microsoft.com> Cc: Haiyang Zhang <haiyangz@microsoft.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * net/usbnet: reserve headroom on rx skbsEric Dumazet2012-03-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | network drivers should reserve some headroom on incoming skbs so that we dont need expensive reallocations, eg forwarding packets in tunnels. This NET_SKB_PAD padding is done in various helpers, like __netdev_alloc_skb_ip_align() in this patch, combining NET_SKB_PAD and NET_IP_ALIGN magic. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Cc: Oliver Neukum <oneukum@suse.de> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: David S. Miller <davem@davemloft.net>
| * bnx2x: fix memory leak in bnx2x_init_firmware()Michal Schmidt2012-03-161-26/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When cycling the interface down and up, bnx2x_init_firmware() knows that the firmware is already loaded, but nevertheless it allocates certain arrays anew (init_data, init_ops, init_ops_offsets, iro_arr). The old arrays are leaked. Fix the leaks by returning early if the firmware was already loaded. Because if the firmware is loaded, so are the arrays. Signed-off-by: Michal Schmidt <mschmidt@redhat.com> Acked-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * bnx2x: fix a crash on corrupt firmware fileMichal Schmidt2012-03-161-0/+1
| | | | | | | | | | | | | | | | | | | | If the requested firmware is deemed corrupt and then released, reset the pointer to NULL in order to avoid double-freeing it in bnx2x_release_firmware() or dereferencing it in bnx2x_init_firmware(). Signed-off-by: Michal Schmidt <mschmidt@redhat.com> Acked-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | Merge branch 'akpm' (Andrew's patch-bomb)Linus Torvalds2012-03-152-16/+16
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge patches from Andrew Morton: "Nine patches - some bug fixes and some MAINTAINERS fiddling." * emailed from Andrew Morton <akpm@linux-foundation.org>: drivers/video/backlight/s6e63m0.c: fix corruption storing gamma mode MAINTAINERS: add entry for exynos mipi display drivers MAINTAINERS: fix link to Gustavo Padovans tree MAINTAINERS: add Johan to Bluetooth maintainers MAINTAINERS: Gustavo has moved prctl: use CAP_SYS_RESOURCE for PR_SET_MM option rapidio/tsi721: fix bug in register offset definitions MAINTAINERS: update ST's Mailing list for SPEAr memcg: free mem_cgroup by RCU to fix oops
| * | drivers/video/backlight/s6e63m0.c: fix corruption storing gamma modeDan Carpenter2012-03-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | strict_strtoul() writes a long but ->gamma_mode only has space to store an int, so on 64 bit systems we end up scribbling over ->gamma_table_count as well. I've changed it to use kstrtouint() instead. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
| * | rapidio/tsi721: fix bug in register offset definitionsAlexandre Bounine2012-03-151-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix indexed register offset definitions that use decimal (wrong) instead of hexadecimal (correct) notation for indexing multipliers. Incorrect definitions do not affect Tsi721 driver in its current default configuration because it uses only IDB queue 0. Loss of inbound doorbell functionality should be observed if queue other than 0 is used. Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com> Cc: Matt Porter <mporter@kernel.crashing.org> Cc: Chul Kim <chul.kim@idt.com> Cc: <stable@vger.kernel.org> [3.2+] Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | Merge branch 'i2c-for-linus' of ↵Linus Torvalds2012-03-152-5/+15
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging Pull i2c subsystem fixes from Jean Delvare. * 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging: i2c-algo-bit: Fix spurious SCL timeouts under heavy load i2c-core: Comment says "transmitted" but means "received"
| * | | i2c-algo-bit: Fix spurious SCL timeouts under heavy loadVille Syrjala2012-03-151-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the system is under heavy load, there can be a significant delay between the getscl() and time_after() calls inside sclhi(). That delay may cause the time_after() check to trigger after SCL has gone high, causing sclhi() to return -ETIMEDOUT. To fix the problem, double check that SCL is still low after the timeout has been reached, before deciding to return -ETIMEDOUT. Signed-off-by: Ville Syrjala <syrjala@sci.fi> Cc: stable@vger.kernel.org Signed-off-by: Jean Delvare <khali@linux-fr.org>
| * | | i2c-core: Comment says "transmitted" but means "received"Wolfram Sang2012-03-151-4/+8
| |/ / | | | | | | | | | | | | | | | | | | | | | Fix that. Also convert this and the related comment to proper commenting style. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Jean Delvare <khali@linux-fr.org>
* | | Merge tag 'hwmon-for-linus' of ↵Linus Torvalds2012-03-152-18/+11
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon fixes from Guenter Roeck. * tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (zl6100) Enable interval between chip accesses for all chips hwmon: (w83627ehf) Describe undocumented pwm attributes hwmon: (w83627ehf) Fix temp2 source for W83627UHG hwmon: (w83627ehf) Fix memory leak in probe function hwmon: (w83627ehf) Fix writing into fan_stop_time for NCT6775F/NCT6776F
| * | | hwmon: (zl6100) Enable interval between chip accesses for all chipsGuenter Roeck2012-03-141-9/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Intersil reports that all chips supported by the zl6100 driver require an interval between chip accesses, even ZL2004 and ZL6105 which were thought to be safe. Reported-by: Vivek Gani <vgani@intersil.com> Cc: stable@vger.kernel.org # 3.2+ Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>