Commit Graph

115463 Commits

Author SHA1 Message Date
Marc Hulsman a5a4598cd2 hwmon: (w83791d) add support for thermal cruise mode
Add support to set target temperature and tolerance for thermal
cruise mode.

Signed-off-by: Marc Hulsman <m.hulsman@tudelft.nl>
Acked-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-10-17 17:51:17 +02:00
Marc Hulsman b5938f8c4a hwmon: (w83791d) add pwm_enable support
Add support for pwm_enable.

Signed-off-by: Marc Hulsman <m.hulsman@tudelft.nl>
Acked-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-10-17 17:51:17 +02:00
Marc Hulsman 6495ce1840 hwmon: (w83791d) add manual PWM support
Add PWM manual control.

Signed-off-by: Marc Hulsman <m.hulsman@tudelft.nl>
Acked-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-10-17 17:51:17 +02:00
Marc Hulsman 6e1ecd9b8f hwmon: (w83791d) fan 4/5 pins can also be used for gpio
Pins fan/pwm 4-5 can be in use as GPIO. If that is the case, do not
create their sysfs-interface. 

Signed-off-by: Marc Hulsman <m.hulsman@tudelft.nl>
Acked-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-10-17 17:51:16 +02:00
Andrew Morton a80e8ee667 hwmon: (max1619) Use inline functions instead of macros
Macros evaluating their arguments more than once are evil.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-10-17 17:51:16 +02:00
Jean Delvare 4ed1077953 hwmon: (it87) Fix thermal sensor type values
The it87 driver doesn't follow the standard sensor type values as
documented in Documentation/hwmon/sysfs-interface. It uses value 2 for
thermistors instead of value 4. This causes "sensors" to tell the user
that the chip is setup for a transistor while it is actually setup for
a thermistor.

Using value 4 for thermistors solves the problem. For compatibility
reasons, we still accept value 2 but emit a warning message so that
users update their configuration files.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Hans de Goede <hdegoede@redhat.com>
2008-10-17 17:51:16 +02:00
Jean Delvare 0c6e973171 hwmon: (lm78) Convert to a new-style i2c driver
The new-style lm78 driver implements the optional detect() callback
to cover the use cases of the legacy driver.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-10-17 17:51:16 +02:00
Jean Delvare 6e1b5029dc hwmon: (lm78) Stop abusing struct i2c_client for ISA devices
Upcoming changes to the I2C part of the lm78 driver will cause ISA
devices to no longer have a struct i2c_client at hand. So, we must
stop (ab)using it now.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-10-17 17:51:15 +02:00
Jean Delvare ad3273be8e hwmon: (lm78) Prevent misdetection of Winbond chips
The LM78 detection is relatively weak, and sometimes recent Winbond
chips can be misdetected as an LM78. We have had repeated reports of
this happening. We have an explicit check against this for the ISA
access, do the same for I2C access now.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-10-17 17:51:15 +02:00
Jean Delvare 18c73f9042 hwmon: (lm78) Detect alias chips
The LM78 and LM79 can be accessed either on the I2C bus or the ISA
bus. We must not access the same chip through both interfaces. So far
we were relying on the user passing the correct ignore parameter to
skip the registration of the I2C interface as suggested by
sensors-detect, but this is fragile: the user may load the lm78
driver without running sensors-detect, and the i2c bus numbers are
not stable across reboots and hardware changes.

So, better detect alias chips in the driver directly, and skip any
I2C chip which is obviously an alias of the ISA chip. This is done
by comparing the value of 26 selected registers.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-10-17 17:51:15 +02:00
Jean Delvare 47c15532dd hwmon: (lm78) Fix I/O resource conflict with PNP
Only request I/O ports 0x295-0x296 instead of the full I/O address
range. This solves a conflict with PNP resources on a few motherboards.

Also request the I/O ports in two parts (4 low ports, 4 high ports)
during device detection, otherwise the PNP resource make the request
(and thus the detection) fail.

This is the exact same fix that was applied to driver w83781d in
March 2008 to address the same problem:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2961cb22ef02850d90e7a12c28a14d74e327df8d

Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-10-17 17:51:15 +02:00
Jean Delvare f908037a01 hwmon: (lm85) Better label names
Label names ERROR1 and ERROR3 aren't exactly explicit. Change them for
better names that indicate what we are up to.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Herbert Poetzl <herbert@13thfloor.at>
2008-10-17 17:51:14 +02:00
Jean Delvare 1b92adaddd hwmon: (lm85) Simplify RANGE_TO_REG
Function RANGE_TO_REG can easily be simplified. Credits go to Herbert
Poetzl for indirectly suggesting this to me. I tested that the new
implementation returns the same result as the original implementation
for all input values.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Herbert Poetzl <herbert@13thfloor.at>
2008-10-17 17:51:14 +02:00
Jean Delvare 67712d0192 hwmon: (lm85) Convert to a new-style i2c driver
The new-style lm85 driver implements the optional detect() callback
to cover the use cases of the legacy driver.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Herbert Poetzl <herbert@13thfloor.at>
2008-10-17 17:51:14 +02:00
Jean Delvare 8a0795d9b8 hwmon: (lm85) Support different PWM frequency tables
The Analog Devices and SMSC devices supported by the lm85 driver do
not have the same PWM frequency table as the National Semiconductor
devices. Add support for per-device frequency tables.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Herbert Poetzl <herbert@13thfloor.at>
2008-10-17 17:51:14 +02:00
Jean Delvare 86010c982d hwmon: (lm85) Select the closest PWM frequency
The LM85 and compatible chips only support 8 arbitrary PWM frequencies.
The algorithm to pick one of them based on the user input is not
optimum. Improve it to always pick the closest supported frequency.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Herbert Poetzl <herbert@13thfloor.at>
2008-10-17 17:51:13 +02:00
Jean Delvare 34e7dc6ca4 hwmon: (lm85) Implement the standard PWM frequency interface
Implement the standard PWM frequency interface: pwm[1-*]_freq in
units of 1 Hz, instead of the non-standard pwm[1-*]_auto_pwm_freq
in units of 0.1 Hz. The old naming was not only non-standard, it was
also confusing, because it suggested that the frequency value only
applied in automatic fan speed mode, which isn't true.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Herbert Poetzl <herbert@13thfloor.at>
2008-10-17 17:51:13 +02:00
Jean Delvare 69fc1feba2 hwmon: (lm85) Rework the device detection
Rework the device detection to make it clearer and faster in the
general case (when a known device is found.)

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Herbert Poetzl <herbert@13thfloor.at>
2008-10-17 17:51:13 +02:00
Dmitry Torokhov dbee356262 hwmon: (ams) Simplify IRQ handling routine
Simplify the IRQ handling routine of ams driver.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-10-17 17:51:13 +02:00
Dmitry Torokhov ee4cd32ee8 hwmon: (ams) Fix locking issues
Use a separate mutex to serialize input device creation/removal,
otheriwse we deadlock if we try to remove input device while it is
being polled. Also do not take ams_info.lock when it is not needed.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-10-17 17:51:12 +02:00
Dmitry Torokhov 0a02002268 hwmon: (ams) Fix permissions on 'joystick' module parameter
We should not allow writes to the 'joystick' module parameters since
writing there will not trigger creation of the input device. Disable
writes since we provide alternative way of enabling input device via
AMS device's sysfs attribute.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-10-17 17:51:12 +02:00
Jean Delvare 810ad7b62c hwmon: (ams) Convert to a new-style i2c driver
The legacy i2c binding model is phasing out, so the ams driver needs
to be converted to a new-style i2c driver. Here is a naive approach of
this conversion. Basically it is moving the i2c device creation from
the ams driver to the i2c-powermac driver. This should work, but I
suspect we could come up with something cleaner by declaring the i2c
device as part of the platform setup. This could be done later by
someone more familiar with openfirmware-based platforms than I am
myself.

One nice thing brought by this conversion is that the ams driver
should be loaded automatically on systems where is is needed (at
least when the I2C interface to the chip is used) providing
coldplug-aware user-space environment.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Stelian Pop <stelian@popies.net>
Cc: Michael Hanselmann <linux-kernel@hansmi.ch>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2008-10-17 17:51:12 +02:00
Ben Hutchings 47064d645b hwmon: (lm87) Add support for configuration through platform_data
The lm87 driver normally assumes that firmware configured the chip
correctly.  Since this is not always the case, alllow platform code to
set the channel register value via platform_data.  All other
configuration registers can be changed after driver initialisation.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-10-17 17:51:12 +02:00
Ben Hutchings d2cac802fe hwmon: (lm87) Restore original configuration register on removal
This means that if we have to start the monitor when probed, we also
stop it on removal.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-10-17 17:51:11 +02:00
Ben Hutchings 49ae6cc800 hwmon: (lm87) Fix masking of config register in lm87_init_client()
lm87_init_client() conditionally sets the Start bit and clears the
INT#_Clear bit in the Config 1 register.  The condition should be that
either of these bits needs changing, but currently it checks the
(self-clearing) Initialization bit instead of INT#_Clear.

Fix the condition and also ensure we never set the Initialization bit.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-10-17 17:51:11 +02:00
Jean Delvare 4b4e7a72fd hwmon: (lm90) Don't spam the kernel log
Degrade the "Unsupported chip" message from info to debug level.
There's nothing wrong with this, so no need to bother the user.
Also make the message slightly more descriptive.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Martyn Welch <martyn.welch@gefanuc.com>
2008-10-17 17:51:11 +02:00
Ben Hutchings 271dabf5bb hwmon: (lm90) Support MAX6646, MAX6647 and MAX6649
These Maxim chips are similar to MAX6657 but use unsigned temperature
values to allow for readings up to 145 degrees.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-10-17 17:51:11 +02:00
Ben Hutchings 9d4d383422 hwmon: (lm90) Rename temperature conversion functions to match usage
The encoding of temperatures varies between chips and modes.  So do not
use "temp1" or "temp2" in the names of the conversion functions, but
specify the encoding.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Tested-by: Martyn Welch <martyn.welch@gefanuc.com>
2008-10-17 17:51:10 +02:00
Nate Case 23b2d4778a hwmon: (lm90) Support ADT7461 in extended mode
Support ADT7461 in extended temperature range mode, which will change
the range of readings from 0..127 to -64..191 degC.  Adjust the
register conversion functions accordingly.

Signed-off-by: Nate Case <ncase@xes-inc.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Tested-by: Martyn Welch <martyn.welch@gefanuc.com>
2008-10-17 17:51:10 +02:00
Nate Case cea50fe2fd hwmon: (lm90) Convert some macros to static functions
Use static functions instead of the TEMPx_FROM_REG* and TEMPx_TO_REG*
macros.  This will ensure type safety and eliminate any side effects
from arguments passed in since the macros referenced 'val' multiple
times.  This change should not affect functionality.

Signed-off-by: Nate Case <ncase@xes-inc.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Tested-by: Martyn Welch <martyn.welch@gefanuc.com>
2008-10-17 17:51:10 +02:00
Jean Delvare a874a10cf0 hwmon: (lm90) Update datasheet links
Update the links to the datasheet of some of the devices supported by
the lm90 driver. Also remove the links from the driver itself, so that
we don't have to update them twice each time they change.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Martyn Welch <martyn.welch@gefanuc.com>
2008-10-17 17:51:10 +02:00
Jean Delvare 5f502a834a hwmon: (lm90) Don't access nonexistent registers on Maxim chips
The Maxim chips supported by the lm90 driver have 8-bit high and low
remote limit values, not 11-bit as the other chips have. So stop reading
from and writing to registers that do not exist on these chips. Also
round the limit values set by the user properly.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Martyn Welch <martyn.welch@gefanuc.com>
2008-10-17 17:51:09 +02:00
Jean Delvare f65e17086f hwmon: (lm90) Support the extra resolution bits of MAX6657
The Maxim MAX6657, MAX6658 and MAX6659 have extra resolution bits for
the local temperature measurement. Let the lm90 driver read them and
export them to user-space.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Martyn Welch <martyn.welch@gefanuc.com>
2008-10-17 17:51:09 +02:00
Jean Delvare 6388a388ff hwmon: (lm90) Move 16-bit value read to a separate function
Move the code which aggregates two 8-bit register values into a 16-bit
value to a separate function. We'll need to do it a second time soon and
I don't want to duplicate the code.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Martyn Welch <martyn.welch@gefanuc.com>
2008-10-17 17:51:09 +02:00
Linus Torvalds 2e532d68a2 {pci,pnp} quirks.c: don't use deprecated print_fn_descriptor_symbol()
I dunno how this missed Bjorn and his quest to use %pF in commit
c80cfb0406 ("vsprintf: use new vsprintf
symbolic function pointer format"), but it did.

So use %pF in the two remaining places that still tried to print out
function pointers by hand.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-16 16:11:43 -07:00
Linus Torvalds 52ad096465 Merge git://git.linux-nfs.org/projects/trondmy/nfs-2.6
* git://git.linux-nfs.org/projects/trondmy/nfs-2.6: (53 commits)
  NFS: Fix a resolution problem with nfs_inode->cache_change_attribute
  NFS: Fix the resolution problem with nfs_inode_attrs_need_update()
  NFS: Changes to inode->i_nlinks must set the NFS_INO_INVALID_ATTR flag
  RPC/RDMA: ensure connection attempt is complete before signalling.
  RPC/RDMA: correct the reconnect timer backoff
  RPC/RDMA: optionally emit useful transport info upon connect/disconnect.
  RPC/RDMA: reformat a debug printk to keep lines together.
  RPC/RDMA: harden connection logic against missing/late rdma_cm upcalls.
  RPC/RDMA: fix connect/reconnect resource leak.
  RPC/RDMA: return a consistent error, when connect fails.
  RPC/RDMA: adhere to protocol for unpadded client trailing write chunks.
  RPC/RDMA: avoid an oops due to disconnect racing with async upcalls.
  RPC/RDMA: maintain the RPC task bytes-sent statistic.
  RPC/RDMA: suppress retransmit on RPC/RDMA clients.
  RPC/RDMA: fix connection IRD/ORD setting
  RPC/RDMA: support FRMR client memory registration.
  RPC/RDMA: check selected memory registration mode at runtime.
  RPC/RDMA: add data types and new FRMR memory registration enum.
  RPC/RDMA: refactor the inline memory registration code.
  NFS: fix nfs_parse_ip_address() corner case
  ...
2008-10-16 15:39:20 -07:00
Linus Torvalds 8cde1ad668 Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  sched_clock: prevent scd->clock from moving backwards
2008-10-16 15:38:48 -07:00
Linus Torvalds 6bb7a93548 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: us122l: fix missing unlock in usb_stream_hwdep_vm_fault()
  ALSA: hda - Fix quirk lists for realtek codecs
  ALSA: hda - Add support of ALC272
  ALSA: hda - Add ALC887 support
  ALSA: hda - Add ALC1200 support
  ALSA: hda - Fix PCI SSID of ASUS M90V
  ALSA: hda - Add auto mic switch in realtek auto-probe mode
  ALSA: Fix pxa2xx-ac97-lib.c compilation
  ALSA: ASoC: Hide TLV320AIC26 configuration option for non-OpenFirwmare users
  ALSA: hda: fix nid variable warning
  ALSA: ASoC: Fix compile-time warning for tlv320aic23.c
2008-10-16 15:36:58 -07:00
Linus Torvalds 08d19f51f0 Merge branch 'kvm-updates/2.6.28' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm
* 'kvm-updates/2.6.28' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm: (134 commits)
  KVM: ia64: Add intel iommu support for guests.
  KVM: ia64: add directed mmio range support for kvm guests
  KVM: ia64: Make pmt table be able to hold physical mmio entries.
  KVM: Move irqchip_in_kernel() from ioapic.h to irq.h
  KVM: Separate irq ack notification out of arch/x86/kvm/irq.c
  KVM: Change is_mmio_pfn to kvm_is_mmio_pfn, and make it common for all archs
  KVM: Move device assignment logic to common code
  KVM: Device Assignment: Move vtd.c from arch/x86/kvm/ to virt/kvm/
  KVM: VMX: enable invlpg exiting if EPT is disabled
  KVM: x86: Silence various LAPIC-related host kernel messages
  KVM: Device Assignment: Map mmio pages into VT-d page table
  KVM: PIC: enhance IPI avoidance
  KVM: MMU: add "oos_shadow" parameter to disable oos
  KVM: MMU: speed up mmu_unsync_walk
  KVM: MMU: out of sync shadow core
  KVM: MMU: mmu_convert_notrap helper
  KVM: MMU: awareness of new kvm_mmu_zap_page behaviour
  KVM: MMU: mmu_parent_walk
  KVM: x86: trap invlpg
  KVM: MMU: sync roots on mmu reload
  ...
2008-10-16 15:36:00 -07:00
Linus Torvalds 1c95e1b690 Fix kernel/softirq.c printk format warning properly
This fixes the broken 77af7e3403
("softirq, warning fix: correct a format to avoid a warning") fix
correctly.

The type of a pointer subtraction is not "int", nor is it "long".  It
can be either (or something else).  It's "ptrdiff_t", and the printk
format for it is "%td".

Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-16 15:32:46 -07:00
Linus Torvalds e533b22705 Merge branch 'core-v28-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'core-v28-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  do_generic_file_read: s/EINTR/EIO/ if lock_page_killable() fails
  softirq, warning fix: correct a format to avoid a warning
  softirqs, debug: preemption check
  x86, pci-hotplug, calgary / rio: fix EBDA ioremap()
  IO resources, x86: ioremap sanity check to catch mapping requests exceeding, fix
  IO resources, x86: ioremap sanity check to catch mapping requests exceeding the BAR sizes
  softlockup: Documentation/sysctl/kernel.txt: fix softlockup_thresh description
  dmi scan: warn about too early calls to dmi_check_system()
  generic: redefine resource_size_t as phys_addr_t
  generic: make PFN_PHYS explicitly return phys_addr_t
  generic: add phys_addr_t for holding physical addresses
  softirq: allocate less vectors
  IO resources: fix/remove printk
  printk: robustify printk, update comment
  printk: robustify printk, fix #2
  printk: robustify printk, fix
  printk: robustify printk

Fixed up conflicts in:
	arch/powerpc/include/asm/types.h
	arch/powerpc/platforms/Kconfig.cputype
manually.
2008-10-16 15:17:40 -07:00
Linus Torvalds 0999d978dc Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86: fix compat-vdso
  x86/mm: unify init task OOM handling
  x86/mm: do not trigger a kernel warning if user-space disables interrupts and generates a page fault
2008-10-16 15:08:45 -07:00
Julia Lawall 70a3075d40 FRV: Eliminate NULL test and memset after alloc_bootmem
As noted by Akinobu Mita in patch b1fceac2b9,
alloc_bootmem and related functions never return NULL and always return a
zeroed region of memory.  Thus a NULL test or memset after calls to these
functions is unnecessary.

 arch/frv/mm/init.c |    2 --
 1 file changed, 2 deletions(-)

This was fixed using the following semantic patch.
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
expression E;
statement S;
@@

E = \(alloc_bootmem\|alloc_bootmem_low\|alloc_bootmem_pages\|alloc_bootmem_low_pages\)(...)
... when != E
(
- BUG_ON (E == NULL);
|
- if (E == NULL) S
)

@@
expression E,E1;
@@

E = \(alloc_bootmem\|alloc_bootmem_low\|alloc_bootmem_pages\|alloc_bootmem_low_pages\)(...)
... when != E
- memset(E,0,E1);
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-16 15:06:54 -07:00
Harvey Harrison cb76d5a4c4 FRV: Switch unaligned access to the packed-struct implementation
Switch unaligned access to the packed-struct implementation for BE accesses as
this reduces the size of the kernel a little.  LE still uses the byte shift.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-16 15:06:54 -07:00
David Howells c9af956cf7 FRV: Provide dma_map_page() for NOMMU and fix comments
Provide dma_map_page() for the NOMMU-mode FRV arch.

Also do some fixing on the comments attached to the various DMA functions for
both MMU and NOMMU mode FRV code.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-16 15:06:54 -07:00
Bjorn Helgaas 9bd8f9c638 frv: use generic pci_enable_resources()
Use the generic pci_enable_resources() instead of the arch-specific code.

Unlike this arch-specific code, the generic version:
    - checks PCI_NUM_RESOURCES (11), not 6, resources
    - skips resources that have neither IORESOURCE_IO nor IORESOURCE_MEM set
    - skips ROM resources unless IORESOURCE_ROM_ENABLE is set
    - checks for resource collisions with "!r->parent"

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-16 15:06:54 -07:00
Linus Torvalds 1eee21abaf Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
  firewire: Add more documentation to firewire-cdev.h
  firewire: fix ioctl() return code
  firewire: fix setting tag and sy in iso transmission
  firewire: fw-sbp2: fix another small generation access bug
  firewire: fw-sbp2: enforce s/g segment size limit
  firewire: fw_send_request_sync()
  ieee1394: survive a few seconds connection loss
  ieee1394: nodemgr clean up class iterators
  ieee1394: dv1394, video1394: remove unnecessary expressions
  ieee1394: raw1394: make write() thread-safe
  ieee1394: raw1394: narrow down the state_mutex protected region
  ieee1394: raw1394: replace BKL by local mutex, make ioctl() and mmap() thread-safe
  ieee1394: sbp2: enforce s/g segment size limit
  ieee1394: sbp2: check for DMA mapping failures
  ieee1394: sbp2: stricter dma_sync
  ieee1394: Use DIV_ROUND_UP
2008-10-16 15:02:24 -07:00
Harvey Harrison 9d85db2244 lib: remove defining macros for strict_strto??
Open-code them rather than using defining macros.  The function bodies are now
next to their kerneldoc comments as a bonus.

Add casts to the signed cases as they call into the unsigned versions.

Avoids the sparse warnings:
lib/vsprintf.c:249:1: warning: incorrect type in argument 3 (different signedness)
lib/vsprintf.c:249:1:    expected unsigned long *res
lib/vsprintf.c:249:1:    got long *res
lib/vsprintf.c:249:1: warning: incorrect type in argument 3 (different signedness)
lib/vsprintf.c:249:1:    expected unsigned long *res
lib/vsprintf.c:249:1:    got long *res
lib/vsprintf.c:251:1: warning: incorrect type in argument 3 (different signedness)
lib/vsprintf.c:251:1:    expected unsigned long long *res
lib/vsprintf.c:251:1:    got long long *res
lib/vsprintf.c:251:1: warning: incorrect type in argument 3 (different signedness)
lib/vsprintf.c:251:1:    expected unsigned long long *res
lib/vsprintf.c:251:1:    got long long *res

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-16 14:58:08 -07:00
Harvey Harrison 22d27051b4 lib: trivial whitespace tidy
Remove extra lines before the EXPORT_SYMBOL()s

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-16 14:58:07 -07:00
Harvey Harrison aa46a63efc lib: pull base-guessing logic to helper function
The default base is 10 unless there is a leading zero, in which
case the base will be guessed as 8.

The base will only be guesed as 16 when the string starts with '0x'
the third character is a valid hex digit.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-16 14:58:07 -07:00