]> pilppa.org Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
17 years ago[PATCH] switch cciss
Al Viro [Sun, 2 Mar 2008 14:26:41 +0000 (09:26 -0500)]
[PATCH] switch cciss

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years ago[PATCH] switch brd
Al Viro [Sun, 2 Mar 2008 14:24:35 +0000 (09:24 -0500)]
[PATCH] switch brd

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years ago[PATCH] switch ataflop
Al Viro [Sun, 2 Mar 2008 14:23:54 +0000 (09:23 -0500)]
[PATCH] switch ataflop

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years ago[PATCH] switch aoeblk
Al Viro [Sun, 2 Mar 2008 14:23:18 +0000 (09:23 -0500)]
[PATCH] switch aoeblk

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years ago[PATCH] switch amiflop
Al Viro [Sun, 2 Mar 2008 14:22:38 +0000 (09:22 -0500)]
[PATCH] switch amiflop

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years ago[PATCH] switch DAC960
Al Viro [Sun, 2 Mar 2008 14:18:16 +0000 (09:18 -0500)]
[PATCH] switch DAC960

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years ago[PATCH] switch ubd
Al Viro [Sun, 2 Mar 2008 14:16:26 +0000 (09:16 -0500)]
[PATCH] switch ubd

ubd_ioctl() doesn't need BKL, so unlocked_ioctl() it becomes...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years ago[PATCH] beginning of methods conversion
Al Viro [Sun, 2 Mar 2008 14:09:22 +0000 (09:09 -0500)]
[PATCH] beginning of methods conversion

To keep the size of changesets sane we split the switch by drivers;
to keep the damn thing bisectable we do the following:
1) rename the affected methods, add ones with correct
prototypes, make (few) callers handle both.  That's this changeset.
2) for each driver convert to new methods.  *ALL* drivers
are converted in this series.
3) kill the old (renamed) methods.

Note that it _is_ a flagday; all in-tree drivers are converted and by the
end of this series no trace of old methods remain.  The only reason why
we do that this way is to keep the damn thing bisectable and allow per-driver
debugging if anything goes wrong.

New methods:
open(bdev, mode)
release(disk, mode)
ioctl(bdev, mode, cmd, arg) /* Called without BKL */
compat_ioctl(bdev, mode, cmd, arg)
locked_ioctl(bdev, mode, cmd, arg) /* Called with BKL, legacy */

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years ago[PATCH] switch ide_disk_ops ->ioctl() to sane prototype
Al Viro [Thu, 16 Oct 2008 14:23:20 +0000 (10:23 -0400)]
[PATCH] switch ide_disk_ops ->ioctl() to sane prototype

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years ago[PATCH] don't mess with file in scsi_nonblockable_ioctl()
Al Viro [Sun, 2 Mar 2008 13:15:49 +0000 (08:15 -0500)]
[PATCH] don't mess with file in scsi_nonblockable_ioctl()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years ago[PATCH] introduce __blkdev_driver_ioctl()
Al Viro [Thu, 30 Aug 2007 00:34:12 +0000 (20:34 -0400)]
[PATCH] introduce __blkdev_driver_ioctl()

Analog of blkdev_driver_ioctl() with sane arguments.  For
now uses fake struct file, by the end of the series it won't
and blkdev_driver_ioctl() will become a wrapper around it.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years ago[PATCH] switch pktcdvd to blkdev_driver_ioctl()
Al Viro [Wed, 29 Aug 2007 04:56:32 +0000 (00:56 -0400)]
[PATCH] switch pktcdvd to blkdev_driver_ioctl()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years ago[PATCH] switch cdrom_{open,release,ioctl} to sane APIs
Al Viro [Sun, 7 Oct 2007 21:54:28 +0000 (17:54 -0400)]
[PATCH] switch cdrom_{open,release,ioctl} to sane APIs

... convert to it in callers

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years ago[PATCH] move block_device_operations to blkdev.h
Al Viro [Mon, 8 Oct 2007 17:26:20 +0000 (13:26 -0400)]
[PATCH] move block_device_operations to blkdev.h

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years ago[PATCH] lose unused arguments in dm ioctl callbacks
Al Viro [Wed, 29 Aug 2007 02:15:59 +0000 (22:15 -0400)]
[PATCH] lose unused arguments in dm ioctl callbacks

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years ago[PATCH] lose the unused file argument in generic_ide_ioctl()
Al Viro [Tue, 2 Sep 2008 21:19:43 +0000 (17:19 -0400)]
[PATCH] lose the unused file argument in generic_ide_ioctl()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years ago[PATCH] switch scsi_cmd_ioctl() to passing fmode_t
Al Viro [Mon, 27 Aug 2007 19:38:10 +0000 (15:38 -0400)]
[PATCH] switch scsi_cmd_ioctl() to passing fmode_t

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years ago[PATCH] switch sg_scsi_ioctl() to passing fmode_t
Al Viro [Tue, 2 Sep 2008 21:16:41 +0000 (17:16 -0400)]
[PATCH] switch sg_scsi_ioctl() to passing fmode_t

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years ago[PATCH] pass mode instead of file to sg_io()
Al Viro [Tue, 2 Sep 2008 20:35:55 +0000 (16:35 -0400)]
[PATCH] pass mode instead of file to sg_io()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years ago[PATCH] eliminate use of ->f_flags in block methods
Al Viro [Sun, 26 Aug 2007 23:50:05 +0000 (19:50 -0400)]
[PATCH] eliminate use of ->f_flags in block methods

store needed information in f_mode

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years ago[PATCH] introduce fmode_t, do annotations
Al Viro [Tue, 2 Sep 2008 19:28:45 +0000 (15:28 -0400)]
[PATCH] introduce fmode_t, do annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
17 years agortc: Add R2025S/D comment to rs5c372 Kconfig entry.
Paul Mundt [Tue, 21 Oct 2008 11:12:59 +0000 (20:12 +0900)]
rtc: Add R2025S/D comment to rs5c372 Kconfig entry.

This was accidentally left out when the R2025S/D support was merged
earlier.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Export cache flush routines needed by sh_eth on SH7619.
Paul Mundt [Tue, 21 Oct 2008 10:45:08 +0000 (19:45 +0900)]
sh: Export cache flush routines needed by sh_eth on SH7619.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Wire up oops reporting in the die notifier chain.
Paul Mundt [Tue, 21 Oct 2008 09:33:36 +0000 (18:33 +0900)]
sh: Wire up oops reporting in the die notifier chain.

Commit 3f5a54e371ca20b119b73704f6c01b71295c1714 ("ftrace: dump out ftrace
buffers to console on panic") added an ftrace buffer dumper that hooks
in to the die notifier chain and dumps out data in the oops path.

Unfortunately SH supported ftrace but didn't support DIE_OOPS, so add
that in and get it building again.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: ap325rxa: Kill off unused port definitions.
Paul Mundt [Tue, 21 Oct 2008 09:13:15 +0000 (18:13 +0900)]
sh: ap325rxa: Kill off unused port definitions.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Hook up PB0->PB7 input-only pins in SH7203 PFC.
Paul Mundt [Tue, 21 Oct 2008 09:09:43 +0000 (18:09 +0900)]
sh: Hook up PB0->PB7 input-only pins in SH7203 PFC.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: ap325rxa: Move off of hardcoded pinmux for flctl initialization.
Paul Mundt [Tue, 21 Oct 2008 09:08:10 +0000 (18:08 +0900)]
sh: ap325rxa: Move off of hardcoded pinmux for flctl initialization.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: add support FLCTL for ap325rxa board
Yoshihiro Shimoda [Tue, 9 Sep 2008 08:17:42 +0000 (17:17 +0900)]
sh: add support FLCTL for ap325rxa board

This patch adds platform_device for sh_flctl driver, NAND Flash
simple partition, and GPIO setting.

Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: gpio: Stub in dummy GPIO<->IRQ mapping routines.
Paul Mundt [Tue, 21 Oct 2008 08:48:40 +0000 (17:48 +0900)]
sh: gpio: Stub in dummy GPIO<->IRQ mapping routines.

IRQ modes are not presently supported, so stub in dummy definitions
for now (taken from linux/gpio.h).

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agogenirq: fix set_irq_type() when recording trigger type
Chris Friesen [Mon, 20 Oct 2008 18:41:58 +0000 (12:41 -0600)]
genirq: fix set_irq_type() when recording trigger type

Impact: fix boot hang on a G5

In set_irq_type() we want to pass the type rather than the current
interrupt state.

Signed-off-by: Chris Friesen <cfriesen@nortel.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agopci: use pci_ioremap_bar() in sound/
Arjan van de Ven [Sun, 28 Sep 2008 23:20:09 +0000 (16:20 -0700)]
pci: use pci_ioremap_bar() in sound/

Use the newly introduced pci_ioremap_bar() function in sound/.
pci_ioremap_bar() just takes a pci device and a bar number, with the goal
of making it really hard to get wrong, while also having a central place
to stick sanity checks.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
17 years agosh: rsk7203: leds-gpio support for RSK+ LEDs.
Paul Mundt [Tue, 21 Oct 2008 05:27:51 +0000 (14:27 +0900)]
sh: rsk7203: leds-gpio support for RSK+ LEDs.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: gpio: Include asm-generic/gpio.h for non-gpiolib stubs.
Paul Mundt [Tue, 21 Oct 2008 05:27:05 +0000 (14:27 +0900)]
sh: gpio: Include asm-generic/gpio.h for non-gpiolib stubs.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agoMerge commit 'origin' into master
Benjamin Herrenschmidt [Tue, 21 Oct 2008 04:52:04 +0000 (15:52 +1100)]
Merge commit 'origin' into master

Manual merge of:

arch/powerpc/Kconfig
arch/powerpc/include/asm/page.h

17 years agoMerge commit 'kumar/kumar-for-2.6.28'
Benjamin Herrenschmidt [Tue, 21 Oct 2008 04:49:55 +0000 (15:49 +1100)]
Merge commit 'kumar/kumar-for-2.6.28'

17 years agopowerpc/83xx: Add DS1339 RTC support for MPC8349E-mITX boards .dts
Anton Vorontsov [Fri, 17 Oct 2008 18:56:59 +0000 (22:56 +0400)]
powerpc/83xx: Add DS1339 RTC support for MPC8349E-mITX boards .dts

The RTC is sitting on the I2C2 bus at address 0x68. RTC interrupt signal
is connected to the IPIC's EXT2 interrupt line, the line is shared with
Vitesse 8201 Ethernet PHY.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years agopowerpc/83xx: Add support for MCU microcontroller in .dts files
Anton Vorontsov [Fri, 17 Oct 2008 18:57:09 +0000 (22:57 +0400)]
powerpc/83xx: Add support for MCU microcontroller in .dts files

MCU is an external Freescale MC9S08QG8 microcontroller, mainly used to
provide soft power-off function, but also exports two GPIOs (wired to
the LEDs and also available from the external headers).

Added the MCU on mpc8349emitx, mpc837xrdb and mpc8315erdb boards.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years agopowerpc/85xx: Move mpc8572ds.dts to address-cells/size-cells = <2>
Kumar Gala [Tue, 21 Oct 2008 04:02:26 +0000 (23:02 -0500)]
powerpc/85xx: Move mpc8572ds.dts to address-cells/size-cells = <2>

Change the top-level #address-cells and #size-cells to <2> so the
mpc8572ds.dts is easier to deal with both a true 32-bit physical
or 36-bit physical address space.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years agoof/spi: Support specifying chip select as active high via device tree
Wolfgang Ocker [Wed, 15 Oct 2008 13:00:47 +0000 (15:00 +0200)]
of/spi: Support specifying chip select as active high via device tree

The patch allows to specify that an SPI device needs an active high chip
select.

Signed-off-by: Wolfgang Ocker <weo@reccoware.de>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years agopowerpc: Remove device_type = "board_control" properties in .dts files
Anton Vorontsov [Sat, 18 Oct 2008 00:23:52 +0000 (04:23 +0400)]
powerpc: Remove device_type = "board_control" properties in .dts files

We don't want to encourage the bogus device_type usage.

The device type isn't used in the code, so we can simply remove it from
the documentation and dts files.

Boards should specify proper compatible entries instead.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years agoi2c-cpm: Suppress autoprobing for devices
Wolfram Sang [Thu, 16 Oct 2008 19:12:00 +0000 (21:12 +0200)]
i2c-cpm: Suppress autoprobing for devices

Similar to commit 618b26d52843c0f85b8eb143cf2695d7f6fd072d, also remove
automatic probing for this i2c controller. Might need updates to dts files
using it.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Jochen Friedrich <jochen@scram.de>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years agopowerpc/85xx: Fix mpc8536ds dma interrupt numbers
Ed Swarthout [Fri, 17 Oct 2008 05:41:32 +0000 (00:41 -0500)]
powerpc/85xx: Fix mpc8536ds dma interrupt numbers

Signed-off-by: Ed Swarthout <Ed.Swarthout@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years agopowerpc/85xx: Enable enhanced functions for 8536 TSEC
Jason Jin [Thu, 16 Oct 2008 09:31:32 +0000 (17:31 +0800)]
powerpc/85xx: Enable enhanced functions for 8536 TSEC

Signed-off-by: Jason Jin <Jason.jin@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years agopowerpc: Delete unused prom_strtoul and prom_memparse
Milton Miller [Mon, 20 Oct 2008 18:03:18 +0000 (18:03 +0000)]
powerpc: Delete unused prom_strtoul and prom_memparse

These functions should have been static, and inspection shows they
are no longer used.   (We used to parse mem= but we now defer that
to early_param).

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
17 years agopowerpc: Revert CHRP boot wrapper to real-base = 12MB on 32-bit
Paul Mackerras [Mon, 20 Oct 2008 17:42:42 +0000 (17:42 +0000)]
powerpc: Revert CHRP boot wrapper to real-base = 12MB on 32-bit

Commit 9b09c6d909dfd8de96b99b9b9c808b94b0a71614 ("powerpc: Change the
default link address for pSeries zImage kernels") changed the
real-base value in the CHRP note added by addnote to the zImage from
12MB to 32MB.  It turns out that this causes unnecessary extra reboots
on old 32-bit CHRP machines.  This therefore adds a -r flag to addnote
to allow us to specify what real-base value it should put in the CHRP
note, and adjusts the wrapper script to pass -r c00000 to addnote when
making a zImage for a CHRP machine.  Also, CHRP machines ignore the
RPA note, so we don't need to arrange for it to be the same as the
kernel's.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
17 years agopowerpc: Always trim numa memory to lmb_end_of_DRAM()
Milton Miller [Mon, 20 Oct 2008 15:37:04 +0000 (15:37 +0000)]
powerpc: Always trim numa memory to lmb_end_of_DRAM()

numa_enforce_memory_limit tried to be smart and only call lmb_end_of_DRAM
when a memory limit was set via mem= on the command line.  However,
the early boot code will also limit memory added to the lmb system
when iommu=off is specified.  When this happens, the page allocator
is given pages not in the linear mapping and this results in a fatal
data reference to the unmapped page.

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
17 years agopowerpc: Use cpu_thread_in_core in smp_init for of_spin_map
Milton Miller [Mon, 20 Oct 2008 15:37:03 +0000 (15:37 +0000)]
powerpc: Use cpu_thread_in_core in smp_init for of_spin_map

We used to assume that even numbered threads were the primary
threads, ie those that would be listed and started as a cpu from
open firmware.  Replace a left over is even (% 2) check with a check
for it being a primary thread and update the comments.

Tested with a debug print on pseries, identical code found for cell.

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
17 years agopowerpc: Find and destroy possible stale kernel added properties
Milton Miller [Mon, 20 Oct 2008 15:37:03 +0000 (15:37 +0000)]
powerpc: Find and destroy possible stale kernel added properties

64 bit powerpc requires the kexec user space tools avoid overwriting
the static kernel image and translation hash table when choosing
where to put memory image data because it copies the data into place
using the kernels virtual memory system.  Kexec userspace determines
these and other areas blocked by reading properties the kernel adds,
but does not filter these properties when creating the device tree
for the next kernel.

When the second kernel tries to add its values for these properties,
the export via /proc/device-tree is hidden by the pre-existing but
stale values from the flat tree.  Kexec userspace reads the old
property, allocates the new kernel at the old kernel's end, and
gets rejected by the overlap check.

Search and remove these stale properties before adding the new values.

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
17 years agopowerpc: Remove Kconfig support for PPC_MERGE
Kumar Gala [Mon, 20 Oct 2008 08:03:46 +0000 (08:03 +0000)]
powerpc: Remove Kconfig support for PPC_MERGE

There are no users of PPC_MERGE in tree so we can get rid of it.
It was a hold over from the arch/ppc days.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
17 years agopowerpc: Fix build issue with CONFIG_RELOCATABLE=y
Kumar Gala [Mon, 20 Oct 2008 03:16:55 +0000 (03:16 +0000)]
powerpc: Fix build issue with CONFIG_RELOCATABLE=y

There are two issues when we enable CONFIG_RELOCATABLE.  The first is due
to the fact that phys_addr_t is now defined in linux/types.h.  The second
is due to the fact that the DMA code changes expose memstart_addr to
prom_init.c

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
17 years agoof: Format string bug in drivers/of/of_i2c.c
Jon Smirl [Mon, 20 Oct 2008 02:13:15 +0000 (02:13 +0000)]
of: Format string bug in drivers/of/of_i2c.c

Format string bug.  Not exploitable, as this is only writable by root,
but worth fixing all the same.

See 326f6a5c9c9e1a62aec37bdc0c3f8d53adabe77b

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
17 years agopowerpc: Add missing cuImage.initrd.% target
Grant Likely [Fri, 17 Oct 2008 19:12:07 +0000 (19:12 +0000)]
powerpc: Add missing cuImage.initrd.% target

This target is needed to build cuImages with an embedded ramdisk image.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
17 years agopowerpc: Fix boot wrapper memcmp() called with zero length argument
Mike Ditto [Fri, 17 Oct 2008 09:27:51 +0000 (09:27 +0000)]
powerpc: Fix boot wrapper memcmp() called with zero length argument

I noticed, when trying to use, e.g.,
node = find_node_by_prop_value(prev, "booleanprop", "", 0))
to search for all nodes with a certain boolean property, that memcmp()
returns garbage when comparing zero bytes.  It should return zero.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
17 years agopowerpc/numa: Make memory reserve code more robust
Jon Tollefson [Thu, 16 Oct 2008 18:59:43 +0000 (18:59 +0000)]
powerpc/numa: Make memory reserve code more robust

Adjust amount to reserve based on previous nodes for reserves spanning
multiple nodes. Check if the node active range is empty before attempting
to pass the reserve to bootmem.  In practice the range shouldn't be empty,
but to be sure we check.

Signed-off-by: Jon Tollefson <kniht@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
17 years agopowerpc/oprofile: Fix mutex locking for cell spu-oprofile
Carl Love [Tue, 14 Oct 2008 23:37:01 +0000 (23:37 +0000)]
powerpc/oprofile: Fix mutex locking for cell spu-oprofile

The issue is the SPU code is not holding the kernel mutex lock while
adding samples to the kernel buffer.

This patch creates per SPU buffers to hold the data.  Data
is added to the buffers from in interrupt context.  The data
is periodically pushed to the kernel buffer via a new Oprofile
function oprofile_put_buff(). The oprofile_put_buff() function
is called via a work queue enabling the funtion to acquire the
mutex lock.

The existing user controls for adjusting the per CPU buffer
size is used to control the size of the per SPU buffers.
Similarly, overflows of the SPU buffers are reported by
incrementing the per CPU buffer stats.  This eliminates the
need to have architecture specific controls for the per SPU
buffers which is not acceptable to the OProfile user tool
maintainer.

The export of the oprofile add_event_entry() is removed as it
is no longer needed given this patch.

Note, this patch has not addressed the issue of indexing arrays
by the spu number.  This still needs to be fixed as the spu
numbering is not guarenteed to be 0 to max_num_spus-1.

Signed-off-by: Carl Love <carll@us.ibm.com>
Signed-off-by: Maynard Johnson <maynardj@us.ibm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Acked-by: Robert Richter <robert.richter@amd.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
17 years agopowerpc: Unsigned speed cannot be negative in udbg_16559.c
roel kluin [Tue, 14 Oct 2008 14:36:31 +0000 (14:36 +0000)]
powerpc: Unsigned speed cannot be negative in udbg_16559.c

"unsigned int" speed cannot be negative, it's thus pointless
to test if it is.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
17 years agopowerpc/pseries: Validate PFN in pseries_remove_lmb()
Nathan Fontenot [Mon, 13 Oct 2008 08:42:00 +0000 (08:42 +0000)]
powerpc/pseries: Validate PFN in pseries_remove_lmb()

The pfn of the memory to be removed should be validated prior to
attempting to remove the memory.  In cases where the probe of a
memory section fails during hotplug add, the pfn for the lmb may
not be valid.

Signed-off-by: Badari Pulavarty <pbadari@us.ibm.com>
Signed-off-by: Nathan Fontenot <nfont@austin.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
17 years agopowerpc/boot: Compare _start against ei.loadsize instead ei.memsize
Sebastian Siewior [Sun, 12 Oct 2008 23:15:26 +0000 (23:15 +0000)]
powerpc/boot: Compare _start against ei.loadsize instead ei.memsize

If the vmlinux binary in memory is larger than 4 MiB than it collides
with the initial boot code which is linked at 4 MiB in case of cuBoot.
If the the uncompressed image size (on disk size) is less than 4 MiB
then it would fit. The difference between those two sizes is the bss
section. In cuBoot we have the dtb embedded right after the data
section so it is very likely that the reset of the bss section (in
kernel's start up code) will overwrite the dtb blob. Therefore we
reallocate the dtb. Something similar is allready done to the initrd.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
17 years agosh: fix soc-camera compile breakage on Migo-R.
Guennadi Liakhovetski [Tue, 21 Oct 2008 03:44:38 +0000 (12:44 +0900)]
sh: fix soc-camera compile breakage on Migo-R.

Fix Migo-R compile breakage caused by incomplete merge.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: arch/sh/kernel/smp.c needs linux/cpu.h for notify_cpu_starting().
Paul Mundt [Tue, 21 Oct 2008 03:39:24 +0000 (12:39 +0900)]
sh: arch/sh/kernel/smp.c needs linux/cpu.h for notify_cpu_starting().

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Kill off duplicate remove_memory() definition.
Andrew Morton [Tue, 21 Oct 2008 03:37:36 +0000 (12:37 +0900)]
sh: Kill off duplicate remove_memory() definition.

Use the generic remove_memory() provided by mm/memory_hotplug.c instead.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years agosh: Fix up the SH7203 build.
Paul Mundt [Tue, 21 Oct 2008 00:52:02 +0000 (09:52 +0900)]
sh: Fix up the SH7203 build.

The sh7203.h include paths were missed in the previous update, so switch
the include path to cpu/ as with the rest.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
17 years ago[ARM] pxa: fix the corgi_ssp.c dependency issue in {corgi,spitz}_defconfig
Eric Miao [Tue, 21 Oct 2008 03:36:19 +0000 (11:36 +0800)]
[ARM] pxa: fix the corgi_ssp.c dependency issue in {corgi,spitz}_defconfig

Separate building of corgi_ssp.c, and introduce a new hidden config option
CONFIG_CORGI_SSP_DEPRECATED for this. Aslo mark corgi_ts.c and corgi_bl.c
as deprecated.

This unbreaks the legacy configs in {corgi,spitz}_defconfig, however, SPI
based ADS7846 touchscreen driver and a new SPI-based corgi_lcd.c driver
with integrated backlight support are recommended.

Signed-off-by: Eric Miao <eric.miao@marvell.com>
17 years agobinfmt_elf_fdpic: Update for cputime changes.
Paul Mundt [Tue, 21 Oct 2008 03:07:40 +0000 (12:07 +0900)]
binfmt_elf_fdpic: Update for cputime changes.

Commit f06febc96ba8e0af80bcc3eaec0a109e88275fac ("timers: fix itimer/
many thread hang") introduced a new task_cputime interface and
subsequently only converted binfmt_elf over to it.  This results in the
build for binfmt_elf_fdpic blowing up given that p->signal->{u,s}time
have disappeared from underneath us.

Apply the same trivial fix from binfmt_elf to binfmt_elf_fdpic.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agomd: allow extended partitions on md devices.
NeilBrown [Tue, 21 Oct 2008 02:25:32 +0000 (13:25 +1100)]
md: allow extended partitions on md devices.

The new extended partition support provides a much nicer was
to have partitions on md devices that the 'mdp' alternate major.
We cannot really get rid of 'mdp' at this time, but we can
enable extended partitions as that will probably make life
easier for sysadmins.

Signed-off-by: NeilBrown <neilb@suse.de>
17 years agomd: use sysfs_notify_dirent to notify changes to md/dev-xxx/state
NeilBrown [Tue, 21 Oct 2008 02:25:28 +0000 (13:25 +1100)]
md: use sysfs_notify_dirent to notify changes to md/dev-xxx/state

The 'state' file for a device reports, for example, when the device
has failed.  Changes should be reported to userspace ASAP without
the possibility of blocking on low-memory.  sysfs_notify does
have that possibility (as it takes a mutex which can be held
across a kmalloc) so use sysfs_notify_dirent instead.

Signed-off-by: NeilBrown <neilb@suse.de>
17 years agomd: use sysfs_notify_dirent to notify changes to md/array_state
NeilBrown [Tue, 21 Oct 2008 02:25:21 +0000 (13:25 +1100)]
md: use sysfs_notify_dirent to notify changes to md/array_state

Now that we have sysfs_notify_dirent, use it to notify changes
to md/array_state.
As sysfs_notify_dirent can be called in atomic context, we can
remove the delayed notify and the MD_NOTIFY_ARRAY_STATE flag.

Signed-off-by: NeilBrown <neilb@suse.de>
17 years agoMerge commit 'gcl/gcl-next'
Benjamin Herrenschmidt [Tue, 21 Oct 2008 02:14:33 +0000 (13:14 +1100)]
Merge commit 'gcl/gcl-next'

17 years agoMerge commit 'jwb/jwb-next'
Benjamin Herrenschmidt [Tue, 21 Oct 2008 02:14:22 +0000 (13:14 +1100)]
Merge commit 'jwb/jwb-next'

17 years agoRevert "[ARM] pxa/corgi: remove now unused corgi_ssp.c and corgi_lcd.c"
Eric Miao [Tue, 21 Oct 2008 01:42:29 +0000 (09:42 +0800)]
Revert "[ARM] pxa/corgi: remove now unused corgi_ssp.c and corgi_lcd.c"

This reverts commit 68677ab3d08ed6d57be0c1ae4e4d364bb2d104b6.

A smoother migration path would be making corgi_ts.c and other drivers
depending on corgi_ssp.c and corgi_lcd.c to depend on BROKEN instead,
and still allows those to exist around for some time.

Signed-off-by: Eric Miao <eric.miao@marvell.com>
17 years agopowerpc/spufs: Explain conditional decrement of aff_sched_count
Andre Detsch [Tue, 21 Oct 2008 00:16:09 +0000 (11:16 +1100)]
powerpc/spufs: Explain conditional decrement of aff_sched_count

This patch adds a comment to clarify why atomic_dec_if_positive is being used
to decrement gang's aff_sched_count on SPU context unbind.

Signed-off-by: Andre Detsch <adetsch@br.ibm.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
17 years agopowerpc/spufs: Improve search of node for contexts with SPU affinity
Andre Detsch [Tue, 21 Oct 2008 00:15:23 +0000 (11:15 +1100)]
powerpc/spufs: Improve search of node for contexts with SPU affinity

This patch improves redability of the code responsible for trying to find
a node with enough SPUs not committed to other affinity gangs.

An additional check is also added, to avoid taking into account gangs that
have no SPU affinity.

Signed-off-by: Andre Detsch <adetsch@br.ibm.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
17 years agopowerpc/spufs: Use kmalloc rather than kzalloc for switch log buffer
Jeremy Kerr [Fri, 17 Oct 2008 01:02:31 +0000 (12:02 +1100)]
powerpc/spufs: Use kmalloc rather than kzalloc for switch log buffer

No need to zero the entire buffer, just the head and tail indices.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
17 years agopowerpc/spufs: Don't spu_acquire_saved unnecessarily in regs read
Jeremy Kerr [Thu, 16 Oct 2008 00:11:12 +0000 (11:11 +1100)]
powerpc/spufs: Don't spu_acquire_saved unnecessarily in regs read

With most file readers (eg cat, dd), reading a context's regs file will
result in two reads: the first to read the data, and the second to
return EOF. Because each read performs a spu_acquire_saved, we end up
descheduling and re-scheduling the context twice.

This change does a simple check to see if we'd return EOF before
calling spu_acquire_saved(), saving the extra schedule operation.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
17 years agopowerpc/spufs: Don't require full buffer in switch_log read
Jeremy Kerr [Wed, 15 Oct 2008 23:51:46 +0000 (10:51 +1100)]
powerpc/spufs: Don't require full buffer in switch_log read

Currently, read() on the sputrace log will block until the read buffer
is full. This makes it difficult to retrieve the end of the buffer, as
the user will need to read with the right-sized buffer.

In a similar method as 91553a1b5e0df006a3573a88d98ee7cd48a3818a, this
change makes the switch_log return if there has already been data
read.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
17 years agopowerpc/spufs: Use state_mutex for switch_log locking, and prevent multiple openers
Jeremy Kerr [Wed, 15 Oct 2008 23:03:46 +0000 (10:03 +1100)]
powerpc/spufs: Use state_mutex for switch_log locking, and prevent multiple openers

Currently, we use ctx->mapping_lock and ctx->switch_log->lock for the
context switch log. The mapping lock only prevents concurrent open()s,
so we require the switch_lock->lock for reads.

Since writes to the switch log buffer occur on context switches, we're
better off synchronising with the state_mutex, which is held during a
switch. Since we're serialised througout the buffer reads and writes,
we can use the state mutex to protect open and release too, and
can now kfree() the log buffer on release. This allows us to perform
the switch log notify without taking any extra locks.

Because the buffer is only present while the file is open, we can use
it to prevent multiple simultaneous openers.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
17 years agopowerpc/spufs: sputrace: Don't block until the read buffer is full
Jeremy Kerr [Wed, 15 Oct 2008 02:20:42 +0000 (13:20 +1100)]
powerpc/spufs: sputrace: Don't block until the read buffer is full

Currently, read() on the sputrace buffer will only return data when
the user buffer is exhausted. This may mean that we never see the
end of the event log, unless we read() with exactly the right-sized
buffer.

This change makes sputrace_read not block if we have data ready to
return.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
17 years agopowerpc/spufs: sputrace: Only enable logging on open(), prevent multiple openers
Jeremy Kerr [Wed, 15 Oct 2008 02:16:18 +0000 (13:16 +1100)]
powerpc/spufs: sputrace: Only enable logging on open(), prevent multiple openers

Currently, sputrace will start logging to the event buffer before the
log buffer has been open()ed. This results in a heap of "lost samples"
warnings if the sputrace file hasn't yet been opened.

Since the buffer is reset on open() anyway, there's no need to enable
logging when no-one has opened the log.

Because open clears the log, make it return EBUSY for mutliple open
calls.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
17 years agoibm_newemac: Fix new MAL feature handling
Josh Boyer [Thu, 16 Oct 2008 04:38:40 +0000 (04:38 +0000)]
ibm_newemac: Fix new MAL feature handling

Support for new features needed by the PPC 405EZ boards
introduced some errors in the MAL and EMAC feature handling.
This broke 'allmodconfig' builds as CONFIG_PPC_DCR_NATIVE is
not set for those.

This patch fixes these errors by wrapping the code in the
appropriate #ifdefs.

Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
17 years agobacklight: Add driver for Tabletkiosk Sahara TouchIT-213 Tablet PC
Claudio Nieder [Mon, 20 Oct 2008 22:35:40 +0000 (23:35 +0100)]
backlight: Add driver for Tabletkiosk Sahara TouchIT-213 Tablet PC

[akpm@linux-foundation.org: coding-style fixes]
[rpurdie@linux.intel.com: minor tweaks]
Signed-off-by: Claudio Nieder <private@claudio.ch>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
17 years agobacklight: da903x: Add backlight driver for DA9030/DA9034
Mike Rapoport [Mon, 13 Oct 2008 08:03:44 +0000 (09:03 +0100)]
backlight: da903x: Add backlight driver for DA9030/DA9034

Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
17 years agotosa: add support for bl/lcd driver
Dmitry Baryshkov [Sat, 13 Sep 2008 17:06:41 +0000 (21:06 +0400)]
tosa: add support for bl/lcd driver

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
17 years agobacklight: add support for Sharp SL-6000 LCD and backlight drivers
Dmitry Baryshkov [Sat, 13 Sep 2008 16:58:51 +0000 (20:58 +0400)]
backlight: add support for Sharp SL-6000 LCD and backlight drivers

On Sharp SL-6000 lcd/backlight is a bit complex, so add two drivers
one for lcd-driving chip, other one for dac regulating the backlight
LEDS.

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
17 years agomm: remove duplicated #include's
Huang Weiyi [Mon, 20 Oct 2008 22:43:33 +0000 (06:43 +0800)]
mm: remove duplicated #include's

Removed duplicated #include <linux/vmalloc.h> in mm/vmalloc.c and
"internal.h" in mm/memory.c.

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoExport tiny shmem_file_setup for DRM-GEM
Hugh Dickins [Mon, 20 Oct 2008 23:04:04 +0000 (00:04 +0100)]
Export tiny shmem_file_setup for DRM-GEM

We're trying to keep the !CONFIG_SHMEM tiny-shmem.c (using ramfs without
swap) in synch with CONFIG_SHMEM shmem.c (and mpm is preparing patches
to combine them).  I was glad to see EXPORT_SYMBOL_GPL(shmem_file_setup)
go into shmem.c, but why not support DRM-GEM when !CONFIG_SHMEM too?
But caution says still depend on MMU, since !CONFIG_MMU is.. different.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Acked-by: Matt Mackall <mpm@selenic.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agomisc: replace remaining __FUNCTION__ with __func__
Harvey Harrison [Mon, 20 Oct 2008 23:00:08 +0000 (16:00 -0700)]
misc: replace remaining __FUNCTION__ with __func__

__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agofix CONFIG_HIGHMEM compile error in drivers/gpu/drm/i915/i915_gem.c
Thomas Gleixner [Mon, 20 Oct 2008 22:47:45 +0000 (00:47 +0200)]
fix CONFIG_HIGHMEM compile error in drivers/gpu/drm/i915/i915_gem.c

commit 9b7530cc329eb036cfa589930c270e85031f554c ("i915: cleanup coding
horrors in i915_gem_gtt_pwrite()")

broke the i386 build for CONFIG_HIGHMEM=y.

Caught by automatic testing http://www.tglx.de/autoqa-logs/000137-0006-0001.log

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
[ My bad. It's the same patch I sent out earlier, nobody noticed then either.. ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoleds: Simplify logic in leds-ams-delta
Richard Purdie [Mon, 20 Oct 2008 22:46:15 +0000 (23:46 +0100)]
leds: Simplify logic in leds-ams-delta

Simplify logic in leds-ams-delta after various new drivers
writers misunderstood it.

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
17 years agofix WARN() for PPC
Arjan van de Ven [Mon, 20 Oct 2008 21:41:03 +0000 (14:41 -0700)]
fix WARN() for PPC

powerpc doesn't use the generic WARN_ON infrastructure.  The newly
introduced WARN() as a result didn't print the message, this patch adds
the printk for this specific case.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agokexec: fix crash_save_vmcoreinfo_init build problem
Luck, Tony [Mon, 20 Oct 2008 22:23:40 +0000 (15:23 -0700)]
kexec: fix crash_save_vmcoreinfo_init build problem

This fixes

  kernel/kexec.c: In function 'crash_save_vmcoreinfo_init':
  kernel/kexec.c:1374: error: 'vmlist' undeclared (first use in this function)
  kernel/kexec.c:1374: error: (Each undeclared identifier is reported only once
  kernel/kexec.c:1374: error: for each function it appears in.)
  kernel/kexec.c:1410: error: invalid use of undefined type 'struct vm_struct'
  make[1]: *** [kernel/kexec.o] Error 1

Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoleds: Fix trigger registration race
Richard Purdie [Mon, 20 Oct 2008 22:16:17 +0000 (23:16 +0100)]
leds: Fix trigger registration race

Fix a race during trigger registration where we could try and use a lock
before it was initialised.

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
17 years agoMerge branch 'for-rmk' of git://git.marvell.com/orion into devel
Russell King [Mon, 20 Oct 2008 22:06:15 +0000 (23:06 +0100)]
Merge branch 'for-rmk' of git://git.marvell.com/orion into devel

17 years agoleds: Fix leds-class.c comment
Qinghuang Feng [Mon, 20 Oct 2008 22:04:36 +0000 (23:04 +0100)]
leds: Fix leds-class.c comment

led_classdev_unregister() has no "__" prefix, remove it.

Signed-off-by: Qinghuang Feng <qhfeng.kernel@gmail.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
17 years agoleds: Add driver for HP harddisk protection LEDs
Pavel Machek [Mon, 20 Oct 2008 22:02:43 +0000 (23:02 +0100)]
leds: Add driver for HP harddisk protection LEDs

HP notebooks contain accelerometer-based disk protection subsystem,
and LED that indicates hard disk is protected. This is driver for the
LED part.

Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
17 years agoleds: leds-pca955x - Mark pca955x_led_set() static
Sven Wegener [Mon, 20 Oct 2008 21:57:56 +0000 (22:57 +0100)]
leds: leds-pca955x - Mark pca955x_led_set() static

Mark pca955x_led_set() as static

Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
17 years agoleds: Remove uneeded leds-cm-x270 driver
Richard Purdie [Mon, 20 Oct 2008 21:55:00 +0000 (22:55 +0100)]
leds: Remove uneeded leds-cm-x270 driver

The cm-x270 board uses leds-gpio so remove the now unneeded driver.

Acked-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
17 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6
Linus Torvalds [Mon, 20 Oct 2008 21:38:14 +0000 (14:38 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6:
  parisc: convert to generic compat_sys_ptrace
  parisc: add rtc platform driver
  parisc: initialize unwinder much earlier
  parisc: add new syscalls
  parisc: hijack jump to start_kernel
  parisc: add pdc_coproc_cfg_unlocked and set_firmware_width_unlocked
  parisc: move include/asm-parisc to arch/parisc/include/asm
  parisc: move pdc_result to real2.S
  parisc: unify CCIO_COLLECT_STATS implementation
  parisc: add arch/parisc/kernel/.gitignore
  parisc: ropes.h - fix <asm-parisc/*> -> <asm/*>
  parisc: parisc-agp - fix <asm-parisc/*> -> <asm/*>

Resolve remove/rename conflict: include/asm-parisc/a.out.h is no longer
relevant.

17 years agoleds: Remove uneeded strlen calls
Sven Wegener [Mon, 13 Oct 2008 09:41:39 +0000 (10:41 +0100)]
leds: Remove uneeded strlen calls

There's no need for the additional call to strlen(), we can directly
return the value returned by sprintf().  We now return a length value
that doesn't include the final '\0', but user space shouldn't bother
about it anyway.

Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
17 years agoleds: Add leds-wrap default-trigger
Sven Wegener [Mon, 13 Oct 2008 09:43:47 +0000 (10:43 +0100)]
leds: Add leds-wrap default-trigger

The power led is normally lit after boot, let's use the default-on
trigger as the default trigger for it.  This gets the initial brightness
value right and being on is the default behaviour we expect for a power
led.

Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
17 years agoleds: Make default trigger fields const
Trent Piepho [Mon, 13 Oct 2008 09:13:01 +0000 (10:13 +0100)]
leds: Make default trigger fields const

The default_trigger fields of struct gpio_led and thus struct
led_classdev are pretty much always assigned from a string literal,
which means the string can't be modified.  Which is fine, since there is
no reason to modify the string and in fact it never is.

But they should be marked const to prevent such code from being added,
to prevent warnings if -Wwrite-strings is used, when assigned from a
constant string other than a string literal (which produces a warning
under current kernel compiler flags), and for general good coding
practices.

Signed-off-by: Trent Piepho <tpiepho@freescale.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>