summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2010-10-28hwmon: (w83795) Fix LSB reading of fan speedsJean Delvare
Misplaced parentheses caused the wrong register value to be read, resulting in random LSB for fan speed values and limits. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (w83795) Clean up probe functionJean Delvare
* The data structure is zalloc'd, so no need to set individual fields to 0 explicitly. * Refactor the handling of pins that can be used for either temperature or voltage monitoring. * Misc other clean-ups. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (w83795) Fix in17-in20 gain factorJean Delvare
Gain bit set means 1x gain and cleared means 8x gain, not the other way around. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (w83795) Only start monitoring if neededJean Delvare
This saves an SMBus write if monitoring was already enabled. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (w83795) Add const markersJean Delvare
Attribute structures can be made const. Same for the I2C address list. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (w83795) Only create fan[1-8]_target files when neededJean Delvare
Only create fan[1-8]_target files when the fan in question can be controlled (PWM output is present.) Also name these files according to the standard. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (w83795) Move PWM attributes to a dedidated arrayJean Delvare
Use a dedicated 2D array for PWM attributes. This way, PWM attributes are handled the same way as other attributes, this is more consistent. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (w83795) Use 2D arrays for many device attributesJean Delvare
Use 2D arrays for in, fan, temp and dts device attributes. Using linear arrays is too risky as we have to skip some groups depending on the device model and configuration. Adding or removing an attribute would let the driver build silently but then it would crash at runtime. With 2D arrays, the consistency checking happens at build time, which is much safer. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (w83795) Merge w83795_create_files and w83795_remove_filesJean Delvare
Functions w83795_create_files and w83795_remove_files iterate over the same set of files, just calling a different function. Merge them into a single function which takes the action as a parameter. This saves code, and also ensure that file creation and deletion are in sync. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (w83795) Move file creation to a separate function tooJean Delvare
Function w83795_probe() is way too big, move file creation to a separate function to make it more readable. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (w83795) Move files removal to a separate functionJean Delvare
Sysfs files must be removed on device removal but also when device registration fails. Move the code to a separate function to avoid code redundancy. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (w83795) Improve detection routineJean Delvare
Check for additional identification registers. Improve debugging messages on failed detection. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (w83795) Refactor bank selectionJean Delvare
Move the bank selection code to a separate function, to avoid duplicating it in read and write functions. Improve error reporting on register access error. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (w83795) Drop duplicate enumJean Delvare
Enum chips and chip_types are redundant, get rid of the former. Fix the detection code to properly identify the chip variant and name the client accordingly. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (w83795) Misc cleanupsJean Delvare
* Improve driver description. * Drop unused macro. * Drop unreachable code. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: New driver for the W83795G/ADG monitoring chipsWei Song
There is still much work needed, but I wanted to give Wei the credit he deserves. I've merged some of my own fixes already, to make gcc and checkpatch happy. Individual fixes and improvements from me will follow. [JD: Fix build errors] [JD: Coding style cleanups] [JD: Get rid of forward declarations] [JD: Drop VID support] [JD: Drop fault output control feature] [JD: Use lowercase for inline function names] [JD: Use strict variants of the strtol/ul functions] [JD: Shorten the read and write function names] Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (s3c-hwmon) Depend on S3C_ADCMaurus Cuelenaere
This way we don't need to modify Kconfig every time a new SoC comes along to make this driver support it. Also fix some typos while I'm at it. Signed-off-by: Maurus Cuelenaere <mcuelenaere@gmail.com> Reviewed-by: Guenter Roeck <guenter.roeck@ericsson.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (s3c-hwmon) Use a real mutexThomas Gleixner
The semaphore which protects the ADC is semantically a mutex. Use a real mutex. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (lm75) Trivial changes to pacify the checkpatchShubhrajyoti D
Some trivial changes to pacify the checkpatch. Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (lm75) Make the writing to sysfs more robustShubhrajyoti D
Currently we get the checkpatch warning consider using strict_strtol in preference to simple_strtol. Also we should not allow any partially numeric values. Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (lm90) Add support for the W83L771W/GJean Delvare
I was wondering if that chip ever existed publicly... Apparently yes, so add support for it. Signed-off-by: Jean Delvare <khali@linux-fr.org> Tested-by: Alexander Stein <alexander.stein@informatik.tu-chemnitz.de> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
2010-10-28hwmon: (lm90) Add support for update_interval sysfs attributeGuenter Roeck
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (lm90) Introduce capability flag to indicate broken ALERT functionalityGuenter Roeck
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (lm90) Introduce chip parameter structureGuenter Roeck
Instead of using switch/case and if statements in probe, define chip specific functionality in a parameter structure array. Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (lm90) Rearrange code to no longer require forward declarationsGuenter Roeck
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (lm90) Add support for max6695 and max6696Guenter Roeck
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (lm90) Add support for extra features of max6659Guenter Roeck
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (lm90) Add explicit support for max6659Guenter Roeck
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (lm90) Simplify set_temp11 register calculationsGuenter Roeck
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (lm90) Introduce function to delete sysfs filesGuenter Roeck
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (lm90) Introduce device feature bitsGuenter Roeck
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (lm90) Fix checkpatch errorsGuenter Roeck
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: Add tempX_emergency attribute to sysfs ABIGuenter Roeck
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28hwmon: (k8temp) Remove superfluous CPU family checkAndreas Herrmann
The family check in k8temp is not required because the driver is already bound to a northbridge device only used with K8 CPUs. Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-10-28numa: fix slab_node(MPOL_BIND)Eric Dumazet
When a node contains only HighMem memory, slab_node(MPOL_BIND) dereferences a NULL pointer. [ This code seems to go back all the way to commit 19770b32609b: "mm: filter based on a nodemask as well as a gfp_mask". Which was back in April 2008, and it got merged into 2.6.26. - Linus ] Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Cc: Mel Gorman <mel@csn.ul.ie> Cc: Christoph Lameter <cl@linux.com> Cc: Lee Schermerhorn <lee.schermerhorn@hp.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: stable@kernel.org Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-28Staging: brcm80211: fix usage of roundup in structuresGreg Kroah-Hartman
Now that the roundup macro is sane, it can't be used in structure definitions, or the build breaks.. For now, create a "broken_roundup()" macro to get everything building again, but in the end, fixing these structures to use a proper size value is the correct thing to do. Cc: Brett Rudley <brudley@broadcom.com> Cc: Henry Ptasinski <henryp@broadcom.com> Cc: Nohee Ko <noheek@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-28Staging: bcm: fix up network device reference countingGreg Kroah-Hartman
The way network devices are reference counted does not include poking around in the reference count itself. This breaks when the reference count is changed to be a different type. Fix the driver to do the proper function calls instead. Cc: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-28Staging: keucr: fix up US_ macro changeGreg Kroah-Hartman
The usb tree renamed the USB storage defines to make more sense, so this driver needs the changes as well so that things will compile properly. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-28Merge 'staging-next' to Linus's treeGreg Kroah-Hartman
This merges the staging-next tree to Linus's tree and resolves some conflicts that were present due to changes in other trees that were affected by files here. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-28Merge branch 'v4l_for_linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6 * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (505 commits) [media] af9015: Fix max I2C message size when used with tda18271 [media] IR: initialize ir_raw_event in few more drivers [media] Guard a divide in v4l1 compat layer [media] imon: fix nomouse modprobe option [media] imon: remove redundant change_protocol call [media] imon: fix my egregious brown paper bag w/rdev/idev split [media] cafe_ccic: Configure ov7670 correctly [media] ov7670: allow configuration of image size, clock speed, and I/O method [media] af9015: support for DigitalNow TinyTwin v3 [1f4d:9016] [media] af9015: map DigitalNow TinyTwin v2 remote [media] DigitalNow TinyTwin remote controller [media] af9015: RC fixes and improvements videodev2.h.xml: Update to reflect the latest changes at videodev2.h [media] v4l: document new Bayer and monochrome pixel formats [media] DocBook/v4l: Add missing formats used on gspca cpia1 and sn9c2028 [media] firedtv: add parameter to fake ca_system_ids in CA_INFO [media] tm6000: fix a macro coding style issue tm6000: Remove some ugly debug code [media] Nova-S-Plus audio line input [media] [RFC,1/1] V4L2: Use new CAP bits in existing RDS capable drivers ...
2010-10-28Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc: (66 commits) mmc: add new sdhci-pxa driver for Marvell SoCs mmc: make number of mmcblk minors configurable mmc_spi: Recover from CRC errors for r/w operation over SPI. mmc: sdhci-pltfm: add -pltfm driver for imx35/51 mmc: sdhci-of-esdhc: factor out common stuff mmc: sdhci_pltfm: pass more data on custom init call mmc: sdhci: introduce get_ro private write-protect hook mmc: sdhci-pltfm: move .h file into appropriate subdir mmc: sdhci-pltfm: Add structure for host-specific data mmc: fix cb710 kconfig dependency warning mmc: cb710: remove debugging printk (info duplicated from mmc-core) mmc: cb710: clear irq handler on init() error path mmc: cb710: remove unnecessary msleep() mmc: cb710: implement get_cd() callback mmc: cb710: partially demystify clock selection mmc: add a file to debugfs for changing host clock at runtime mmc: sdhci: allow for eMMC 74 clock generation by controller mmc: sdhci: highspeed: check for mmc as well as sd cards mmc: sdhci: Add Moorestown device support mmc: sdhci: Intel Medfield support ...
2010-10-28Merge branch 'for-next' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/hch/hfsplus * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/hch/hfsplus: hfsplus: free space correcly for files unlinked while open hfsplus: fix double lock typo in ioctl
2010-10-28ext4: fix compile with CONFIG_EXT4_FS_XATTR disabledIngo Molnar
Commit 5dabfc78dced ("ext4: rename {exit,init}_ext4_*() to ext4_{exit,init}_*()") causes fs/ext4/super.c:4776: error: implicit declaration of function ‘ext4_init_xattr’ when CONFIG_EXT4_FS_XATTR is disabled. It renamed init_ext4_xattr to ext4_init_xattr but forgot to update the dummy definition in fs/ext4/xattr.h. Signed-off-by: Ingo Molnar <mingo@elte.hu> Acked-by: "Theodore Ts'o" <tytso@mit.edu> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-28Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs: (28 commits) net/9p: Return error on read with NULL buffer 9p: Add datasync to client side TFSYNC/RFSYNC for dotl net/9p: Return error if we fail to encode protocol data fs/9p: Use generic_file_open with lookup_instantiate_filp fs/9p: Add missing iput in v9fs_vfs_lookup fs/9p: Use mknod 9p operation on create without open request net/9p: Add waitq to VirtIO transport. [net/9p]Serialize virtqueue operations to make VirtIO transport SMP safe. 9p: Implement TREADLINK operation for 9p2000.L 9p: Use V9FS_MAGIC in statfs 9p: Implement TGETLOCK 9p: Implement TLOCK [9p] Introduce client side TFSYNC/RFSYNC for dotl. [fs/9p] Add file_operations for cached mode in dotl protocol. fs/9p: Add access = client option to opt in acl evaluation. fs/9p: Implement create time inheritance fs/9p: Update ACL on chmod fs/9p: Implement setting posix acl fs/9p: Add xattr callbacks for POSIX ACL fs/9p: Implement POSIX ACL permission checking function ...
2010-10-28Merge branch 'next' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6 * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6: parisc: add tty driver to PDC console drivers/parisc/iosapic.c: Remove unnecessary kzalloc cast parisc: remove homegrown L1_CACHE_ALIGN macro arch/parisc: Removing undead ifdef CONFIG_PA20 parisc: unwind - optimise linked-list searches for modules parisc: change to new flag variable drivers/char/agp/parisc-agp.c: eliminate memory leak parisc: kill __do_IRQ parisc: convert eisa interrupts to flow handlers parisc: convert gsc and dino pci interrupts to flow handlers parisc: convert suckyio interrupts to flow handlers parisc: convert iosapic interrupts to proper flow handlers parisc: convert cpu interrupts to proper flow handlers parisc: lay groundwork for killing __do_IRQ parisc: add prlimit64 syscall parisc: squelch warning when using dev_get_stats
2010-10-28mmu_notifier.h: fix comment spellingFigo.zhang
Signed-off-by: Figo.zhang <figo1802@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-28Fix install_process_keyring error handlingAndi Kleen
Fix an incorrect error check that returns 1 for error instead of the expected error code. Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-28parisc: fix compile failure with kmap_atomic changesJames Bottomley
Commit 3e4d3af501cc ("mm: stack based kmap_atomic()") overlooked the fact that parisc uses kmap as a coherence mechanism, so even though we have no highmem, we do need to supply our own versions of kmap (and atomic). This patch converts the parisc kmap to the form which is needed to keep it compiling (it's a simple prototype and name change). Signed-off-by: James Bottomley <James.Bottomley@suse.de> Acked-by: Kyle McMartin <kyle@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-28Fix compile brekage with !CONFIG_BLOCKIngo Molnar
Today's git tree fails to build on !CONFIG_BLOCK, due to upstream commit 367a51a33902 ("fs: Add FITRIM ioctl"): include/linux/fs.h:36: error: expected specifier-qualifier-list before ‘uint64_t’ include/linux/fs.h:36: error: expected specifier-qualifier-list before ‘uint64_t’ include/linux/fs.h:36: error: expected specifier-qualifier-list before ‘uint64_t’ The commit adds uint64_t type usage to fs.h, but linux/types.h is not included explicitly - it's only included implicitly via linux/blk_types.h, and there only if CONFIG_BLOCK is enabled. Add the explicit #include to fix this. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-28Merge git://git.infradead.org/battery-2.6Linus Torvalds
* git://git.infradead.org/battery-2.6: power_supply: Mark twl4030_charger as broken