Roopa Prabhu [Tue, 10 Aug 2010 18:55:26 +0000 (18:55 +0000)]
enic: Mark intr_timer in vnic_enet_config as deprecated
Signed-off-by: Scott Feldman <scofeldm@cisco.com> Signed-off-by: Roopa Prabhu <roprabhu@cisco.com> Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Roopa Prabhu [Tue, 10 Aug 2010 18:55:20 +0000 (18:55 +0000)]
enic: Check if rq/wq buf not NULL before freeing them
Signed-off-by: Scott Feldman <scofeldm@cisco.com> Signed-off-by: Roopa Prabhu <roprabhu@cisco.com> Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Roopa Prabhu [Tue, 10 Aug 2010 18:55:15 +0000 (18:55 +0000)]
enic: Clean up: remove enic_dev_stats_clear
Remove function enic_dev_stats_clear and its reference in enic device
init code. Firmware clears device stats on device open. So, no need for
the driver to do it again.
Signed-off-by: Scott Feldman <scofeldm@cisco.com> Signed-off-by: Roopa Prabhu <roprabhu@cisco.com> Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Roopa Prabhu [Tue, 10 Aug 2010 18:55:10 +0000 (18:55 +0000)]
enic: Use offsetof macro in vic tlv length calculation
Signed-off-by: Scott Feldman <scofeldm@cisco.com> Signed-off-by: Roopa Prabhu <roprabhu@cisco.com> Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Roopa Prabhu [Tue, 10 Aug 2010 18:55:05 +0000 (18:55 +0000)]
enic: Add new firmware devcmds
Add new firmware devcmds: CMD_PROXY_BY_INDEX, CMD_CONFIG_INFO_GET
Signed-off-by: Scott Feldman <scofeldm@cisco.com> Signed-off-by: Roopa Prabhu <roprabhu@cisco.com> Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Roopa Prabhu [Tue, 10 Aug 2010 18:55:00 +0000 (18:55 +0000)]
enic: Add support for firmware management device
This patch adds support for firmware management device in enic driver.
A management device is a virtual PCIe device that firmware can present
to the host as its management endpoint. It provides the interface between
the host and adapter firmware for all management operations.
Signed-off-by: Scott Feldman <scofeldm@cisco.com> Signed-off-by: Roopa Prabhu <roprabhu@cisco.com> Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Roopa Prabhu [Tue, 10 Aug 2010 18:54:55 +0000 (18:54 +0000)]
enic: Add set mac address
This patch implements the ndo_set_mac_address netdev operation for an enic device
Signed-off-by: Scott Feldman <scofeldm@cisco.com> Signed-off-by: Roopa Prabhu <roprabhu@cisco.com> Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This patches fixes a couple of checkpatch warnings and errors:
- lines over 80 columns
- printk() instead of pr_cont()
- assignments in tests (if ((foo == bar())))
Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This patch fixes a couple of errors and warnings spotted by checkpatch.pl:
- some lines were over 80 columns
- there were some whitespaces left
The call to printk is now replaced by a call to pr_info and the log-level
included in the driver version is now removed, so there are no longer false
positives on this warning.
Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Wolfram Sang [Sun, 8 Aug 2010 02:32:05 +0000 (02:32 +0000)]
pcnet_cs: Use proper netdev_*-printouts
To prevent broken messages like:
[ 204.024291] eth%d: pcnet_reset_8390() did not complete.
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Cc: Dominik Brodowski <linux@dominikbrodowski.net> Cc: Joe Perches <joe@perches.com> Cc: David Miller <davem@davemloft.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Ben Hutchings [Tue, 17 Aug 2010 09:31:15 +0000 (02:31 -0700)]
ethtool: Provide a default implementation of ethtool_ops::get_drvinfo
The driver name and bus address for a net_device can normally be found
through the driver model now. Instead of requiring drivers to provide
this information redundantly through the ethtool_ops::get_drvinfo
operation, use the driver model to do so if the driver does not define
the operation. Since ETHTOOL_GDRVINFO no longer requires the driver
to implement any operations, do not require net_device::ethtool_ops to
be set either.
Remove implementations of get_drvinfo and ethtool_ops that provide
only this information.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Julia Lawall [Thu, 5 Aug 2010 10:29:19 +0000 (10:29 +0000)]
drivers/isdn: Adjust confusing if indentation
In hisax/hfc_sx.c and mISDN/l1oip_core.c, the code after the if is
outdented so that it is not aligned with the if branch.
In mISDN/dsp_cmx.c, an else is added between the original if branch and the
following statement, in line with the code following it. Without this
change, the first assignment to dsp->rx_W has no useful effect.
The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@r disable braces4@
position p1,p2;
statement S1,S2;
@@
(
if (...) { ... }
|
if (...) S1@p1 S2@p2
)
@script:python@
p1 << r.p1;
p2 << r.p2;
@@
if (p1[0].column == p2[0].column):
cocci.print_main("branch",p1)
cocci.print_secs("after",p2)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: David S. Miller <davem@davemloft.net>
Krishna Kumar [Wed, 4 Aug 2010 06:15:59 +0000 (06:15 +0000)]
macvtap: Implement multiqueue for macvtap driver
Implement multiqueue facility for macvtap driver. The idea is that
a macvtap device can be opened multiple times and the fd's can be
used to register eg, as backend for vhost.
Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Krishna Kumar [Wed, 4 Aug 2010 06:15:52 +0000 (06:15 +0000)]
core: Factor out flow calculation from get_rps_cpu
Factor out flow calculation code from get_rps_cpu, since other
functions can use the same code.
Revisions:
v2 (Ben): Separate flow calcuation out and use in select queue.
v3 (Arnd): Don't re-implement MIN.
v4 (Changli): skb->data points to ethernet header in macvtap, and
make a fast path. Tested macvtap with this patch.
v5 (Changli):
- Cache skb->rxhash in skb_get_rxhash
- macvtap may not have pow(2) queues, so change code for
queue selection.
(Arnd):
- Use first available queue if all fails.
Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Dmitry Kravkov [Tue, 3 Aug 2010 21:49:40 +0000 (21:49 +0000)]
bnx2x: Load firmware in open() instead of probe()
Loading firmware when actually bringing eth device up.
This also will allow driver to be insmoded when filesystem with
firmware files is not available yet.
Suggested by Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Linus Torvalds [Mon, 16 Aug 2010 00:37:07 +0000 (17:37 -0700)]
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
gcc-4.6: ACPI: fix unused but set variables in ACPI
ACPI thermal: make procfs I/F depend on CONFIG_ACPI_PROCFS
ACPI video: make procfs I/F depend on CONFIG_ACPI_PROCFS
ACPI processor: remove deprecated ACPI procfs I/F
ACPI power_resource: remove unused procfs I/F
ACPI: remove deprecated ACPI procfs I/F
ACPI: introduce drivers/acpi/sysfs.c
ACPI: introduce module parameter acpi.aml_debug_output
ACPI: introduce drivers/acpi/debugfs.c
ACPI, APEI, ERST debug support
ACPI, APEI, Manage GHES as platform devices
ACPI, APEI, Rename CPER and GHES severity constants
ACPI, APEI, Fix a typo of error path of apei_resources_request
ACPI / ACPICA: Fix reference counting problems with GPE handlers
ACPI: Add the check of ADR flag in course of finding ACPI handle for PCI device
ACPI / Sleep: Drop acpi_suspend_finish()
ACPI / Sleep: Consolidate suspend and hibernation routines
ACPI / Wakeup: Simplify enabling of wakeup devices
ACPI / Sleep: Rework enabling wakeup devices
ACPI / Sleep: Free NVS copy if suspending of devices fails
Fixed up totally buggered "ACPI: fix unused but set variables in ACPI"
patch that doesn't even compile in the merge.
Thanks to Sedat Dilek <sedat.dilek@googlemail.com> for noticing the
breakage before I even pulled. And a big "Grrr.." at Len for not even
bothering to compile the tree before asking me to pull.
Linus Torvalds [Mon, 16 Aug 2010 00:32:47 +0000 (17:32 -0700)]
Merge git://git.infradead.org/mtd-2.6
* git://git.infradead.org/mtd-2.6:
mtd/nand_ids: Fix buswidth
mtd/m25p80: fix test for end of loop
mtd/m25p80: retlen is never NULL
MIPS: Fix gen_nand probe structures contents
gen_nand: Test if nr_chips field is valid
BFIN: Fix gen_nand probe structures contents
nand/denali: move all hardware initialization work to denali_hw_init
nand/denali: Add a page check in denali_read_page & denali_read_page_raw
nand/denali: use cpu_relax() while waiting for hardware interrupt
nand/denali: change read_status function method
nand/denali: Fixed check patch warnings
ARM: Fix gen_nand probe structures contents
mtd/nand_base: fix kernel-doc warnings & typos
nand/denali: use dev_xx debug function to replace nand_dbg_print and some printk
nand/denali: Fixed handle ECC error bugs
nand/denali: use iowrite32() to replace denali_write32()
nand/denali: Fixed probe function bugs
* git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
arch/tile: don't validate CROSS_COMPILE needlessly
arch/tile: export only COMMAND_LINE_SIZE to userspace.
arch/tile: rename ARCH_KMALLOC_MINALIGN to ARCH_DMA_MINALIGN
arch/tile: Rename the hweight() implementations to __arch_hweight()
arch/tile: extend syscall ABI to set r1 on return as well.
arch/tile: Various cleanups.
arch/tile: support backtracing on TILE-Gx
arch/tile: Fix a couple of issues with the COMPAT code for TILE-Gx.
arch/tile: Use separate, better minsec values for clocksource and sched_clock.
arch/tile: correct a bug in freeing bootmem by VA for the optional second initrd.
arch: tile: mm: pgtable.c: Removed duplicated #include
arch: tile: kernel/proc.c Removed duplicated #include
Add fanotify syscalls to <asm-generic/unistd.h>.
arch/tile: support new kunmap_atomic() naming convention.
tile: remove unused ISA_DMA_THRESHOLD define
Conflicts in arch/tile/configs/tile_defconfig (pick the mainline version
with the reduced defconfig).
With this change, the arch/tile Makefile will only check for a valid
combination of CROSS_COMPILE vs "uname -m" for a few common targets
that are typically the ones we get wrong (vmlinux, all, and modules).
The change handles the case of an empty "make" goal like "make all".
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com> Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Linus Torvalds [Sun, 15 Aug 2010 18:35:52 +0000 (11:35 -0700)]
mm: fix up some user-visible effects of the stack guard page
This commit makes the stack guard page somewhat less visible to user
space. It does this by:
- not showing the guard page in /proc/<pid>/maps
It looks like lvm-tools will actually read /proc/self/maps to figure
out where all its mappings are, and effectively do a specialized
"mlockall()" in user space. By not showing the guard page as part of
the mapping (by just adding PAGE_SIZE to the start for grows-up
pages), lvm-tools ends up not being aware of it.
- by also teaching the _real_ mlock() functionality not to try to lock
the guard page.
That would just expand the mapping down to create a new guard page,
so there really is no point in trying to lock it in place.
It would perhaps be nice to show the guard page specially in
/proc/<pid>/maps (or at least mark grow-down segments some way), but
let's not open ourselves up to more breakage by user space from programs
that depends on the exact deails of the 'maps' file.
Special thanks to Henrique de Moraes Holschuh for diving into lvm-tools
source code to see what was going on with the whole new warning.
Linus Torvalds [Sun, 15 Aug 2010 18:22:00 +0000 (11:22 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
ALSA: sound/usb/format: silence uninitialized variable warnings
MAINTAINERS: Add Ian Lartey as comaintaner for Wolfson devices
MAINTAINERS: Make Wolfson entry also cover CODEC drivers
ASoC: Only tweak WM8994 chip configuration on devices up to rev D
ASoC: Optimise DSP performance for WM8994
ALSA: hda - Fix dynamic ADC change working again
ALSA: hda - Restrict PCM parameters per ELD information over HDMI
sound: oss: sh_dac_audio.c removed duplicated #include
Linus Torvalds [Sun, 15 Aug 2010 18:17:52 +0000 (11:17 -0700)]
Merge branch 'idle-release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-idle-2.6
* 'idle-release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-idle-2.6:
intel_idle: recognize Lincroft Atom Processor
intel_idle: no longer EXPERIMENTAL
intel_idle: disable module support
intel_idle: add support for Westmere-EX
intel_idle: delete power_policy modparam, and choose substate functions
intel_idle: delete substates DEBUG modparam
Gcc complains that ret might be used uninitialized:
sound/usb/format.c: In function âsnd_usb_parse_audio_formatâ:
sound/usb/format.c:354: warning: âretâ may be used uninitialized in this function
sound/usb/format.c:354: note: âretâ was declared here
sound/usb/format.c:414: warning: âretâ may be used uninitialized in this function
sound/usb/format.c:414: note: âretâ was declared here
I suppose it could be uninitialized if there is ever a UAC_VERSION_3
released. Anyway this patch is worthwhile if only to silence the gcc
warning.
Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Min Zhang [Sun, 15 Aug 2010 05:42:51 +0000 (22:42 -0700)]
ipv6: remove sysctl jiffies conversion on gc_elasticity and min_adv_mss
sysctl output ipv6 gc_elasticity and min_adv_mss as values divided by
HZ. However, they are not in unit of jiffies, since ip6_rt_min_advmss
refers to packet size and ip6_rt_fc_elasticity is used as scaler as in
expire>>ip6_rt_gc_elasticity, so replace the jiffies conversion
handler will regular handler for them.
This has impact on scripts that are currently working assuming the
divide by HZ, will yield different results with this patch in place.
Signed-off-by: Min Zhang <mzhang@mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Herbert Xu [Sun, 15 Aug 2010 05:38:09 +0000 (22:38 -0700)]
xfrm: Use GFP_ATOMIC in xfrm_compile_policy
As xfrm_compile_policy runs within a read_lock, we cannot use
GFP_KERNEL for memory allocations.
Reported-by: Luca Tettamanti <kronos.it@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
ACPI video: make procfs I/F depend on CONFIG_ACPI_PROCFS
Mark ACPI video driver procfs I/F deprecated, including:
/proc/acpi/video/*/info
/proc/acpi/video/*/DOS
/proc/acpi/video/*/ROM
/proc/acpi/video/*/POST
/proc/acpi/video/*/POST_info
/proc/acpi/video/*/*/info
/proc/acpi/video/*/*/state
/proc/acpi/video/*/*/EDID
and
/proc/acpi/video/*/*/brightness, because
1. we already have the sysfs I/F /sysclass/backlight/ as the replacement
of /proc/acpi/video/*/*/brightness.
2. the other procfs I/F is not useful for userspace.
Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
code for ACPI sysfs I/F, including
#ifdef ACPI_DEBUG
/sys/module/acpi/parameters/debug_layer
/sys/module/acpi/parameters/debug_level
/sys/module/acpi/parameters/trace_method_name
/sys/module/acpi/parameters/trace_debug_layer
/sys/module/acpi/parameters/trace_debug_level
/sys/module/acpi/parameters/trace_state
#endif
/sys/module/acpi/parameters/acpica_version
/sys/firmware/acpi/tables/
/sys/firmware/acpi/interrupts/
is moved to this file.
No function change in this patch.
Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Huang Ying [Thu, 12 Aug 2010 03:55:17 +0000 (11:55 +0800)]
ACPI, APEI, ERST debug support
This patch adds debugging/testing support to ERST. A misc device is
implemented to export raw ERST read/write/clear etc operations to user
space. With this patch, we can add ERST testing support to
linuxfirmwarekit ISO (linuxfirmwarekit.org) to verify the kernel
support and the firmware implementation.
Signed-off-by: Huang Ying <ying.huang@intel.com> Acked-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/cleanup:
defconfig reduction
kbuild: drop unifdef-y support
archs: replace unifdef-y with header-y
include: replace unifdef-y with header-y
Randy Dunlap [Sat, 14 Aug 2010 20:05:57 +0000 (13:05 -0700)]
fusion: add function parameter names to kernel-doc
Fix fusion missing kernel-doc:
Warning(drivers/message/fusion/mptbase.c:649): No description found for parameter 'func_name'
Warning(drivers/message/fusion/mptbase.c:8010): No description found for parameter 'cb_idx'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Sat, 14 Aug 2010 21:57:58 +0000 (14:57 -0700)]
Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging
* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging: (22 commits)
hwmon: (via-cputemp) Remove bogus "SHOW" global variable
hwmon: jc42 depends on I2C
hwmon: (pc87427) Add a maintainer
hwmon: (pc87427) Move sysfs file removal to a separate function
hwmon: (pc87427) Add temperature monitoring support
hwmon: (pc87427) Add support for the second logical device
hwmon: (pc87427) Add support for manual fan speed control
hwmon: (pc87427) Minor style cleanups
hwmon: (pc87427) Handle disabled fan inputs properly
hwmon: (w83627ehf) Add support for W83667HG-B
hwmon: (w83627ehf) Driver cleanup
hwmon: Add driver for SMSC EMC2103 temperature monitor and fan controller
hwmon: Remove in[0-*]_fault from sysfs-interface
hwmon: Add 4 current alarm/beep attributes to sysfs-interface
hwmon: Add 3 critical limit attributes to sysfs-interface
hwmon: (asc7621) Clean up and improve detect function
hwmon: (it87) Export labels for internal sensors
hwmon: (lm75) Add suspend/resume feature
hwmon: (emc1403) Add power support
hwmon: (ltc4245) Expose all GPIO pins as analog voltages
...
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (28 commits)
[SCSI] qla4xxx: fix compilation warning
[SCSI] make error handling more robust in the face of reservations
[SCSI] tgt: fix warning
[SCSI] drivers/message/fusion: Adjust confusing if indentation
[SCSI] Return NEEDS_RETRY for eh commands with status BUSY
[SCSI] ibmvfc: Driver version 1.0.9
[SCSI] ibmvfc: Fix terminate_rport_io
[SCSI] ibmvfc: Fix rport add/delete race resulting in oops
[SCSI] lpfc 8.3.16: Change LPFC driver version to 8.3.16
[SCSI] lpfc 8.3.16: FCoE Discovery and Failover Fixes
[SCSI] lpfc 8.3.16: SLI Additions, updates, and code cleanup
[SCSI] pm8001: introduce missing kfree
[SCSI] qla4xxx: Update driver version to 5.02.00-k3
[SCSI] qla4xxx: Added AER support for ISP82xx
[SCSI] qla4xxx: Handle outstanding mbx cmds on hung f/w scenarios
[SCSI] qla4xxx: updated mbx_sys_info struct to sync with FW 4.6.x
[SCSI] qla4xxx: clear AF_DPC_SCHEDULED flage when exit from do_dpc
[SCSI] qla4xxx: Stop firmware before doing init firmware.
[SCSI] qla4xxx: Use the correct request queue.
[SCSI] qla4xxx: set correct value in sess->recovery_tmo
...
H. Peter Anvin [Sat, 14 Aug 2010 19:09:02 +0000 (21:09 +0200)]
hwmon: (via-cputemp) Remove bogus "SHOW" global variable
The via-cputemp hwmon driver was probably intending "typedef enum {
... } SHOW;", but the "typedef" was missing creating a global variable
named "SHOW". There is absolutely no reason to have this in the
global namespace.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com> Acked-by: Harald Welte <HaraldWelte@viatech.com> Cc: Juerg Haefliger <juergh@gmail.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
Randy Dunlap [Sat, 14 Aug 2010 19:09:01 +0000 (21:09 +0200)]
hwmon: jc42 depends on I2C
jc42 uses i2c interfaces, so it should depend on I2C.
drivers/hwmon/jc42.c:426: error: implicit declaration of function 'i2c_check_functionality'
drivers/hwmon/jc42.c:521: error: implicit declaration of function 'i2c_smbus_read_word_data'
drivers/hwmon/jc42.c:529: error: implicit declaration of function 'i2c_smbus_write_word_data'
drivers/hwmon/jc42.c:580: error: implicit declaration of function 'i2c_add_driver'
drivers/hwmon/jc42.c:585: error: implicit declaration of function 'i2c_del_driver'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
Jean Delvare [Sat, 14 Aug 2010 19:09:00 +0000 (21:09 +0200)]
hwmon: (pc87427) Move sysfs file removal to a separate function
The sysfs file removal code is the same in the probe error path and in
the remove function, so move it to a separate function to avoid code
duplication.
Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Jean Delvare [Sat, 14 Aug 2010 19:08:59 +0000 (21:08 +0200)]
hwmon: (pc87427) Add temperature monitoring support
Add support for the 6 temperature monitoring channels of the PC87427.
Note that the sensors resolution can vary, and I couldn't find a way
to figure it out, so we might have to compensate in user-space.
Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Jean Delvare [Sat, 14 Aug 2010 19:08:58 +0000 (21:08 +0200)]
hwmon: (pc87427) Add support for the second logical device
The second logical device contains the voltage and temperature
registers. We have to extend the driver to support a second logical
device before we can add support for these features.
Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Jean Delvare [Sat, 14 Aug 2010 19:08:58 +0000 (21:08 +0200)]
hwmon: (pc87427) Add support for manual fan speed control
Add initial support for PWM outputs of the PC87427 Super-I/O chip.
Only mode change and manual fan speed control are supported. Automatic
mode configuration isn't supported, and won't be until at least one
board is known, which makes uses of the PWM outputs.
Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Jean Delvare [Sat, 14 Aug 2010 19:08:56 +0000 (21:08 +0200)]
hwmon: (pc87427) Handle disabled fan inputs properly
Most fan input pins of the PC87427 can have alternate functions.
Update the driver to check the configuration register and only support
fan inputs which are really used for fan monitoring.
Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Guenter Roeck [Sat, 14 Aug 2010 19:08:55 +0000 (21:08 +0200)]
hwmon: (w83627ehf) Driver cleanup
- Moved fan pwm register array pointers into per-instance data.
- Only read fan pwm data for installed/supported fans.
- Update fan max output and fan step output information from data in
registers.
- Create max_output and step_output attribute files only if respective
fan pwm registers exist.
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
hwmon: Add driver for SMSC EMC2103 temperature monitor and fan controller
SMSC's EMC2103 family of temperature/fan controllers have 1
onboard and up to 3 external temperature sensors, and allow
closed-loop control of one fan. This patch adds support for
them.
Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
Jean Delvare [Sat, 14 Aug 2010 19:08:54 +0000 (21:08 +0200)]
hwmon: Remove in[0-*]_fault from sysfs-interface
Fault files are for hardware failures that can be reported. So far
we've seen chips reporting such failures for temperature sensors and
fans, but not for voltages. Remove in[0-*]_fault for now. It can be
added back later if really needed, but I doubt it.
Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Jean Delvare [Sat, 14 Aug 2010 19:08:50 +0000 (21:08 +0200)]
hwmon: (it87) Export labels for internal sensors
Some voltage sensors can be wired internally to the IT87xxF chip's own
power supply channels. In that case, we can inform user-space that the
wiring is known by exporting proper labels for these sensors.
Ira W. Snyder [Sat, 14 Aug 2010 19:08:49 +0000 (21:08 +0200)]
hwmon: (ltc4245) Expose all GPIO pins as analog voltages
Add support for exposing all GPIO pins as analog voltages. Though this is
not an ideal use of the chip, some hardware engineers may decide that the
LTC4245 meets their design requirements when studying the datasheet.
The GPIO pins are sampled in round-robin fashion, meaning that a slow
reader will see stale data. A userspace application can detect this,
because it will get -EAGAIN when reading from a sysfs file which contains
stale data.
Users can choose to use this feature on a per-chip basis by using either
platform data or the OF device tree (where applicable).
Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu> Signed-off-by: Jean Delvare <khali@linux-fr.org>
Jean Delvare [Sat, 14 Aug 2010 19:08:48 +0000 (21:08 +0200)]
hwmon: (pc87360) Fix device resource declaration
It's not OK to call platform_device_add_resources() multiple times
in a row. Despite its name, this functions sets the resources, it
doesn't add them. So we have to prepare an array with all the
resources, and then call platform_device_add_resources() once.
Before this fix, only the last I/O resource would be actually
registered. The other I/O resources were leaked.
Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Jim Cromie <jim.cromie@gmail.com> Cc: stable@kernel.org
Julia Lawall [Sat, 14 Aug 2010 19:08:47 +0000 (21:08 +0200)]
hwmon: (k8temp) Adjust confusing if indentation
Move the if(err) statement after the if into the if branch indicated by its
indentation. The preceding if(err) test implies that err cannot be nonzero
unless the if branch is taken.
The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@r disable braces5@
position p1,p2;
statement S1,S2;
@@
(
if (...) { ... }
|
if (...) S1@p1 S2@p2
)
@script:python@
p1 << r.p1;
p2 << r.p2;
@@
if (p1[0].column == p2[0].column):
cocci.print_main("branch",p4)
cocci.print_secs("after",p5)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Jean Delvare <khali@linux-fr.org>
Linus Torvalds [Sat, 14 Aug 2010 18:59:44 +0000 (11:59 -0700)]
Merge branch 'for-linus/samsung-2635' of git://git.fluff.org/bjdooks/linux
* 'for-linus/samsung-2635' of git://git.fluff.org/bjdooks/linux:
DMAENGINE: correct PL080 register header file
ARM: SAMSUNG: Fix on build warning about dependency in Kconfig
ARM: SMDK6410: Make virtual screen twice depth of real
ARM: S3C64XX: Update consistent DMA size to 8MiB
ARM: S3C64XX: Add audio support to SmartQ
ARM: S3C64XX: Framebuffer fix for SmartQ5
ARM: S3C64XX: Set wifi and iNAND as permanently connected SD devices on SmartQ boards
ARM: S3C64XX: Move SmartQ LCD control platform definition to shared file
ARM: mach-real6410: add sdhc device support
ARM: mach-real6410: add dm9000 ethernet support for mach-real6410
ARM: S3C64XX: Support for Real6410
Fix up trivial conflicts in arch/arm/mach-s3c64xx/mach-smartq5.c
("remove pixclock" vs "Framebuffer fix for SmartQ5")
Linus Torvalds [Sat, 14 Aug 2010 18:57:54 +0000 (11:57 -0700)]
Merge branch 'for-linus/i2c-2636' of git://git.fluff.org/bjdooks/linux
* 'for-linus/i2c-2636' of git://git.fluff.org/bjdooks/linux:
i2c/nuc900: add i2c driver support for nuc900
i2c: Enable NXP LPC support in Kconfig
i2c-pxa: fix compiler warning, due to missing const
i2c: davinci: bus recovery procedure to clear the bus
i2c: davinci: Add cpufreq support
i2c: davinci: Add suspend/resume support
i2c: davinci: Add helper functions for power management
i2c: davinci: misc. cleanups: remove MOD_REG_BIT and IO_ADDRESS usage
i2c: davinci: Fix smbus Oops with AIC33 usage