]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
17 years agoStaging: w35und: remove memcpy/memcmp wrappers
Pekka Enberg [Wed, 29 Oct 2008 18:10:55 +0000 (20:10 +0200)]
Staging: w35und: remove memcpy/memcmp wrappers

The OS_MEMORY_CLEAR macro is not used so remove it. Also convert the one
call-site that uses OS_MEMORY_COMPARE to use memcmp() directly and remove the
wrapper macro.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoStaging: w35und: remove atomic op wrappers
Pekka Enberg [Wed, 29 Oct 2008 18:10:32 +0000 (20:10 +0200)]
Staging: w35und: remove atomic op wrappers

Use the kernel provided atomic op functions and remove the OS_ATOMIC and
related wrapper macros.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoStaging: w35und: remove timer wrappers
Pekka Enberg [Wed, 29 Oct 2008 18:10:10 +0000 (20:10 +0200)]
Staging: w35und: remove timer wrappers

This patch removes the OS_TIMER and related wrappers from driver code. The
patch also changes the code to use msecs_to_jiffies() for setting up
timer->expires.

Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoStaging: w35und: move supported band initialization out of wb35_probe()
Pekka Enberg [Mon, 27 Oct 2008 22:20:03 +0000 (00:20 +0200)]
Staging: w35und: move supported band initialization out of wb35_probe()

This patch moves the static struct ieee80211_supported_band initialization out
of w35_probe() because it's really global read-only configuration data.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoStaging: w35und: plug memory leak in wbsoft_tx()
Pekka Enberg [Mon, 27 Oct 2008 22:14:38 +0000 (00:14 +0200)]
Staging: w35und: plug memory leak in wbsoft_tx()

There's no reason to duplicate the skb in wbsoft_tx() and leak GFP_ATOMIC
memory as the contents are copied to ->TxBuffer in MdxTx() anyway before
MLMESendFrame() returns.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoStaging: w35und: remove macro magic from MLME_GetNextPacket()
Pekka Enberg [Mon, 27 Oct 2008 22:14:14 +0000 (00:14 +0200)]
Staging: w35und: remove macro magic from MLME_GetNextPacket()

This removes the macro magic from MLME_GetNextPacket() to de-obfuscate the
code.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoStaging: w35und: usb_put_dev() is missing from wb35_disconnect()
Pekka Enberg [Mon, 27 Oct 2008 21:29:31 +0000 (23:29 +0200)]
Staging: w35und: usb_put_dev() is missing from wb35_disconnect()

The wb35_probe() function does usb_get_dev() so add a missing usb_put_dev() to
the wb35_disconnect() function. Also fix error handling paths in wb35_probe()
to call usb_put_dev() as well.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoStaging: w35und: OS_MEMORY_ALLOC wrapper removal
Pekka Enberg [Mon, 27 Oct 2008 20:47:12 +0000 (22:47 +0200)]
Staging: w35und: OS_MEMORY_ALLOC wrapper removal

This patch removes the rather scary OS_MEMORY_ALLOC macro.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoStaging: w35und: remove true/false boolean macros
Pekka Enberg [Mon, 27 Oct 2008 20:46:39 +0000 (22:46 +0200)]
Staging: w35und: remove true/false boolean macros

Use the kernel built-in true and false boolean values instead of duplicating
them in the driver code.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agow35und: remove dead code from wbusb_f.h
Pekka Enberg [Mon, 27 Oct 2008 20:44:19 +0000 (22:44 +0200)]
w35und: remove dead code from wbusb_f.h

Remove dead code from wbusb_f.h and move the WbWLanInitialize() definition to
wblinux_f.h where it arguably belongs to. As the wbusb_f.h is now empty, we can
remove it completely.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoStaging: w35und: remove usb_alloc_urb wrapper function
Greg Kroah-Hartman [Mon, 27 Oct 2008 21:21:24 +0000 (14:21 -0700)]
Staging: w35und: remove usb_alloc_urb wrapper function

No need for a simple wrapper here.

Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoStaging: w35und: remove usb_submit_urb wrapper function
Greg Kroah-Hartman [Mon, 27 Oct 2008 21:21:24 +0000 (14:21 -0700)]
Staging: w35und: remove usb_submit_urb wrapper function

No need for a simple wrapper here.

Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoStaging: w35und: wb35_probe() cleanup
Pekka Enberg [Wed, 22 Oct 2008 08:04:23 +0000 (11:04 +0300)]
Staging: w35und: wb35_probe() cleanup

Fix error handling in wb35_probe() function and clean it up a bit.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoStaging: w35und: merge wblinux struct to adapter
Pekka Enberg [Wed, 22 Oct 2008 08:03:54 +0000 (11:03 +0300)]
Staging: w35und: merge wblinux struct to adapter

Zaps another compatability layer from the driver code.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoStaging: w35und: padapter struct typedef removal
Pekka Enberg [Wed, 22 Oct 2008 08:03:19 +0000 (11:03 +0300)]
Staging: w35und: padapter struct typedef removal

Remove the PADAPTER typedef and its strange variants. Also fix up variable
names that use the type while we're at it.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoStaging: w35und: wb35reg struct typedef removal
Pekka Enberg [Wed, 22 Oct 2008 08:02:37 +0000 (11:02 +0300)]
Staging: w35und: wb35reg struct typedef removal

This patch removes the WB35REG struct typedefs and fixes up variable names that
use the type.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoStaging: w35und: reg queue struct typedef removal
Pekka Enberg [Wed, 22 Oct 2008 08:01:47 +0000 (11:01 +0300)]
Staging: w35und: reg queue struct typedef removal

This patch removes the struct typedefs for reg queues.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoStaging: w35und: purb typedef removal
Pekka Enberg [Wed, 22 Oct 2008 08:01:16 +0000 (11:01 +0300)]
Staging: w35und: purb typedef removal

This patch removes the struct urb pointer typedef from the driver code and
fixes up variable names that use the typedef while we're at it.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoStaging: w35und: remove the no-op pa_stall_execution macro
Pekka Enberg [Wed, 22 Oct 2008 16:07:26 +0000 (19:07 +0300)]
Staging: w35und: remove the no-op pa_stall_execution macro

The pa_stall_execution() macro doesn't do anything so remove it from driver
code.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoStaging: w35und: use msleep() and udelay()
Pekka Enberg [Wed, 22 Oct 2008 16:07:03 +0000 (19:07 +0300)]
Staging: w35und: use msleep() and udelay()

This patch removes the OS_SLEEP() wrapper and changes the call-sites to use
msleep() and udelay() where appropriate.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoStaging: w35und: remove unused wb35_open() and wb35_close() functions
Pekka Enberg [Wed, 22 Oct 2008 16:06:13 +0000 (19:06 +0300)]
Staging: w35und: remove unused wb35_open() and wb35_close() functions

The functions are not used anywhere so remove them.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoStaging: w35und: make wb35_probe() and wb35_disconnect() funtions static
Pekka Enberg [Wed, 22 Oct 2008 16:05:54 +0000 (19:05 +0300)]
Staging: w35und: make wb35_probe() and wb35_disconnect() funtions static

The wb35_probe() and wb35_disconnect() functions are only used in wbusb.c so
make them static and remove them from a header file.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agostaging: correct dubious use of !x & y
Harvey Harrison [Wed, 22 Oct 2008 03:27:16 +0000 (20:27 -0700)]
staging: correct dubious use of !x & y

Noticed by sparse:
drivers/staging/me4000/me4000.c:1213:43: warning: dubious: !x & y
drivers/staging/wlan-ng/p80211wext.c:1583:21: warning: dubious: !x & y

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoStaging: Kconfig for ARCH=arm,8300, cris
F. Duncan M. Haldane [Fri, 7 Nov 2008 23:17:51 +0000 (18:17 -0500)]
Staging: Kconfig for ARCH=arm,8300, cris

The new Kconfig option to build "staging" drivers (code in
drivers/staging/) is seen in all except three architectures (arm, h8300,
cris), because in these cases arch/$ARCH/Kconfig does NOT source
drivers/Kconfig.

This patch adds the source "drivers/staging/Kconfig" to
arch/$ARCH/Kconfig for these three exceptional cases.

Signed-off-by: Duncan Haldane <duncan_h@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoStaging: go7007: fixes due v4l2_file_operations api change
Greg Kroah-Hartman [Mon, 5 Jan 2009 18:21:08 +0000 (10:21 -0800)]
Staging: go7007: fixes due v4l2_file_operations api change

v4l2_file_operations was introduced, so use it to fix up
the build errors in the go7007 driver.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoStaging: go7007: fixes due to video_usercopy api change
Greg Kroah-Hartman [Mon, 5 Jan 2009 18:21:08 +0000 (10:21 -0800)]
Staging: go7007: fixes due to video_usercopy api change

video_usercopy() just changed its arguments, so fix up the go7007 driver
to properly build.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agosparc64: Fix unsigned long long warnings in drivers.
Sam Ravnborg [Tue, 6 Jan 2009 21:20:38 +0000 (13:20 -0800)]
sparc64: Fix unsigned long long warnings in drivers.

Fix warnings caused by the unsigned long long usage in sparc
specific drivers.

The drivers were considered sparc specific more or less from the
filename alone.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agosparc64: Use unsigned long long for u64.
Sam Ravnborg [Tue, 6 Jan 2009 21:19:28 +0000 (13:19 -0800)]
sparc64: Use unsigned long long for u64.

Andrew Morton wrote:

    People keep on doing

            printk("%llu", some_u64);

    testing it only on x86_64 and this generates a warning storm on
    powerpc, sparc64, etc.  Because they use `long', not `long long'.

    Quite a few 64-bit architectures are using `long' for their
    s64/u64 types.  We should convert them all to `long long'.

Update types.h so we use unsigned long long for u64 and
fix all warnings in sparc64 code.
Tested with an allnoconfig, defconfig and allmodconfig builds.

This patch introduces additional warnings in several drivers.
These will be dealt with in separate patches.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agosparc: refactor code in fault_32.c
Sam Ravnborg [Tue, 6 Jan 2009 20:52:41 +0000 (12:52 -0800)]
sparc: refactor code in fault_32.c

The sparc allmodconfig build broke due to enabling of the
branch_tracer that does some very clever things with
all if conditions. This caused my gcc 3.4.5 to be so confused that
it emitted a warning:

arch/sparc/mm/fault_32.c: In function `do_sparc_fault':
arch/sparc/mm/fault_32.c:176: warning: 'fixup' might be used uninitialized in this function

And with -Werror this broke the build.

Refactor code so it:
1) becomes more readable
2) no longer emit a warning with the branch_tracer enabled

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agosparc64: refactor code in init_64.c
Sam Ravnborg [Tue, 6 Jan 2009 20:51:26 +0000 (12:51 -0800)]
sparc64: refactor code in init_64.c

The sparc64 allmodconfig build broke due to enabling of the
branch_tracer that does some very clever things with
all if conditions. This caused my gcc 3.4.5 to be so confused that
it emitted two warnings:

arch/sparc/mm/init_64.c: In function `update_mmu_cache':
arch/sparc/mm/init_64.c:271: warning: 'pg_flags' might be used uninitialized in this function
arch/sparc/mm/init_64.c:272: warning: 'page' might be used uninitialized in this function

And with -Werror this broke the build.

Refactor code so it:
1) becomes more readable
2) no longer emit a warning with the branch_tracer enabled

The refactoring uses a small helper function (flush_dcache()).

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agosparc64: refactor code in viohs.c
Sam Ravnborg [Tue, 6 Jan 2009 20:46:46 +0000 (12:46 -0800)]
sparc64: refactor code in viohs.c

The sparc64 allmodconfig build broke due to enabling of the
branch_tracer that does some very clever things with
all if conditions. This caused my gcc 3.4.5 to be so confused that
it emitted a warning:

arch/sparc/kernel/viohs.c: In function `vio_control_pkt_engine':
arch/sparc/kernel/viohs.c:335: warning: 'nver' might be used uninitialized in this function

And with -Werror this broke the build.

Refactor code so it:
1) becomes more readable
2) no longer emit a warning with the branch_tracer enabled

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agojbd2: Fix oops in jbd2_journal_init_inode() on corrupted fs
Jan Kara [Tue, 6 Jan 2009 19:53:35 +0000 (14:53 -0500)]
jbd2: Fix oops in jbd2_journal_init_inode() on corrupted fs

On 32-bit system with CONFIG_LBD getblk can fail because provided
block number is too big.  Add error checks so we fail gracefully if
getblk() returns NULL (which can also happen on memory allocation
failures).

Thanks to David Maciejak from Fortinet's FortiGuard Global Security
Research Team for reporting this bug.

http://bugzilla.kernel.org/show_bug.cgi?id=12370

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
cc: stable@kernel.org

17 years agoext4: Remove "extents" mount option
Theodore Ts'o [Tue, 6 Jan 2009 19:53:16 +0000 (14:53 -0500)]
ext4: Remove "extents" mount option

This mount option is largely superfluous, and in fact the way it was
implemented was buggy; if a filesystem which did not have the extents
feature flag was mounted -o extents, the filesystem would attempt to
create and use extents-based file even though the extents feature flag
was not eabled.  The simplest thing to do is to nuke the mount option
entirely.  It's not all that useful to force the non-creation of new
extent-based files if the filesystem can support it.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
17 years agoblock: Add Kconfig help which notes that ext4 needs CONFIG_LBD
Theodore Ts'o [Tue, 6 Jan 2009 20:16:33 +0000 (15:16 -0500)]
block: Add Kconfig help which notes that ext4 needs CONFIG_LBD

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: Jens Axboe <jens.axboe@oracle.com>
17 years agoia64: fix section mismatch swiotlb_dma_init -> swiotlb_init
Luck, Tony [Tue, 6 Jan 2009 18:25:25 +0000 (10:25 -0800)]
ia64: fix section mismatch swiotlb_dma_init -> swiotlb_init

Impact: Section fix

WARNING: vmlinux.o(.text+0x596d2): Section mismatch in
reference from the function swiotlb_dma_init() to the function
.init.text:swiotlb_init()
The function swiotlb_dma_init() references
the function __init swiotlb_init().
This is often because swiotlb_dma_init lacks a __init
annotation or the annotation of swiotlb_init is wrong.

Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
17 years agocan: omit unneeded skb_clone() calls
Oliver Hartkopp [Tue, 6 Jan 2009 19:07:54 +0000 (11:07 -0800)]
can: omit unneeded skb_clone() calls

The AF_CAN core delivered always cloned sk_buffs to the AF_CAN
protocols, although this was _only_ needed by the can-raw protocol.
With this (additionally documented) change, the AF_CAN core calls the
callback functions of the registered AF_CAN protocols with the original
(uncloned) sk_buff pointer and let's the can-raw protocol do the
skb_clone() itself which omits all unneeded skb_clone() calls for other
AF_CAN protocols.

Signed-off-by: Oliver Hartkopp <oliver@hartkopp.net>
Signed-off-by: Urs Thuermann <urs.thuermann@volkswagen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agodm9601: bring datasheet URL up to date
Wu Fengguang [Tue, 6 Jan 2009 18:56:07 +0000 (10:56 -0800)]
dm9601: bring datasheet URL up to date

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agodm9601: handle corrupt mac address
Wu Fengguang [Tue, 6 Jan 2009 18:55:10 +0000 (10:55 -0800)]
dm9601: handle corrupt mac address

Some cheap devices ship with dangling EEPROM pins!
They always return invalid address ff:ff:ff:ff:ff:ff.

Inherit the auto-generated address in this case,
so that these products can work with zero configuration.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agovlan: Add GRO interfaces
Herbert Xu [Tue, 6 Jan 2009 18:50:09 +0000 (10:50 -0800)]
vlan: Add GRO interfaces

This patch adds GRO interfaces for hardware-assisted VLAN reception.
With this in place we're now at parity with LRO as far as the
interface is concerned.  That is, you can now take any LRO driver
and convert it over to GRO.

As the CB memory clashes with GRO's use of CB, I've removed it
entirely by storing dev in skb->dev.  This is OK because VLAN
gets called first thing in netif_receive_skb and skb->dev is
not used in between us calling netif_rx and netif_receive_skb
getting called.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agogro: Add internal interfaces for VLAN
Herbert Xu [Tue, 6 Jan 2009 18:49:34 +0000 (10:49 -0800)]
gro: Add internal interfaces for VLAN

Previously GRO's only entry point from the outside is through
napi_gro_receive and napi_gro_frags.  These interfaces are for
device drivers.

This patch rearranges things to provide a new set of interfaces
for VLANs.  These interfaces are for internal use only.  The
VLAN code itself can then provide a set of entry points for
device drivers.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoibmveth: use consistent types
Stephen Rothwell [Tue, 6 Jan 2009 18:47:44 +0000 (10:47 -0800)]
ibmveth: use consistent types

These variables are only used with an interface that just dumps their
values into registers to be passed to the hypervisor. The arguments
to that interface are declared to be "unsigned long", so make these
variables match.  The macros are only used with these variables, so make
them match as well.

This code is currently only built for 64bit powerpc, so the transformation
is really a noop.  If the interface was ever ported to 32 bit, it would
almost certainly still use registers to pass the parameters and so
"unsigned long" would still be appropriate.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agonet/ehea: use consistant type
Stephen Rothwell [Tue, 6 Jan 2009 18:47:16 +0000 (10:47 -0800)]
net/ehea: use consistant type

ehea_plpar_hcall9() takes an "unsigned long" array to return its results,
so change the arrays we pass to it to match.  This is currently only
64 bit code, so the transformation is actually a noop, but because
ehea_plpar_hcall9() copies the values of registers into the array,
if this was ported to a 32 bit hypervisor interface "unsigned long"
would probably still be the correct type.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agosch_teql: convert to net_device_ops
Stephen Hemminger [Tue, 6 Jan 2009 18:45:57 +0000 (10:45 -0800)]
sch_teql: convert to net_device_ops

Convert this driver to net_device_ops.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoxen-netfront: convert to net_device_ops
Stephen Hemminger [Tue, 6 Jan 2009 18:44:55 +0000 (10:44 -0800)]
xen-netfront: convert to net_device_ops

Convert Xen device to new API.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agouio: make uio_info's name and version const
Stephen Rothwell [Fri, 12 Dec 2008 10:44:21 +0000 (11:44 +0100)]
uio: make uio_info's name and version const

These are only ever assigned constant strings and never modified.

This was noticed because Wolfram Sang needed to cast the result of
of_get_property() in order to assign it to the name field of a struct
uio_info.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Hans J. Koch <hjk@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUIO: Documentation for UIO ioport info handling
Hans J. Koch [Sat, 6 Dec 2008 01:25:13 +0000 (02:25 +0100)]
UIO: Documentation for UIO ioport info handling

This patch updates UIO documentation with the changes introduced by
previous UIO patch.

Signed-off-by: Hans J. Koch <hjk@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUIO: Pass information about ioports to userspace (V2)
Hans J. Koch [Sat, 6 Dec 2008 01:23:13 +0000 (02:23 +0100)]
UIO: Pass information about ioports to userspace (V2)

Devices sometimes have memory where all or parts of it can not be mapped to
userspace. But it might still be possible to access this memory from
userspace by other means. An example are PCI cards that advertise not only
mappable memory but also ioport ranges. On x86 architectures, these can be
accessed with ioperm, iopl, inb, outb, and friends. Mike Frysinger (CCed)
reported a similar problem on Blackfin arch where it doesn't seem to be easy
to mmap non-cached memory but it can still be accessed from userspace.

This patch allows kernel drivers to pass information about such ports to
userspace. Similar to the existing mem[] array, it adds a port[] array to
struct uio_info. Each port range is described by start, size, and porttype.

If a driver fills in at least one such port range, the UIO core will simply
pass this information to userspace by creating a new directory "portio"
underneath /sys/class/uio/uioN/. Similar to the "mem" directory, it will
contain a subdirectory (portX) for each port range given.

Note that UIO simply passes this information to userspace, it performs no
action whatsoever with this data. It's userspace's responsibility to obtain
access to these ports and to solve arch dependent issues. The "porttype"
attribute tells userspace what kind of port it is dealing with.

This mechanism could also be used to give userspace information about GPIOs
related to a device. You frequently find such hardware in embedded devices,
so I added a UIO_PORT_GPIO definition. I'm not really sure if this is a good
idea since there are other solutions to this problem, but it won't hurt much
anyway.

Signed-off-by: Hans J. Koch <hjk@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUIO: uio_pdrv_genirq: allow custom irq_flags
Mike Frysinger [Wed, 29 Oct 2008 22:35:52 +0000 (18:35 -0400)]
UIO: uio_pdrv_genirq: allow custom irq_flags

I can't think of a reason why the driver prevents people from setting any
custom bits in their platform device, but I can think of some reasons for
allowing custom flags.  Like setting the IRQF_TRIGGER_... bits.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Hans J. Koch <hjk@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUIO: use pci_ioremap_bar() in drivers/uio
Arjan van de Ven [Tue, 21 Oct 2008 09:17:51 +0000 (11:17 +0200)]
UIO: use pci_ioremap_bar() in drivers/uio

Use the newly introduced pci_ioremap_bar() function in drivers/uio.
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: Hans J. Koch <hjk@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoarm: struct device - replace bus_id with dev_name(), dev_set_name()
Kay Sievers [Tue, 6 Jan 2009 18:44:43 +0000 (10:44 -0800)]
arm: struct device - replace bus_id with dev_name(), dev_set_name()

Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agolibata: struct device - replace bus_id with dev_name(), dev_set_name()
Kay Sievers [Tue, 6 Jan 2009 18:44:43 +0000 (10:44 -0800)]
libata: struct device - replace bus_id with dev_name(), dev_set_name()

Cc: Jeff Garzik <jgarzik@redhat.com>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoavr: struct device - replace bus_id with dev_name(), dev_set_name()
Kay Sievers [Tue, 6 Jan 2009 18:44:43 +0000 (10:44 -0800)]
avr: struct device - replace bus_id with dev_name(), dev_set_name()

Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoblock: struct device - replace bus_id with dev_name(), dev_set_name()
Kay Sievers [Tue, 6 Jan 2009 18:44:43 +0000 (10:44 -0800)]
block: struct device - replace bus_id with dev_name(), dev_set_name()

Cc: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agochris: struct device - replace bus_id with dev_name(), dev_set_name()
Kay Sievers [Tue, 6 Jan 2009 18:44:42 +0000 (10:44 -0800)]
chris: struct device - replace bus_id with dev_name(), dev_set_name()

Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agodmi: struct device - replace bus_id with dev_name(), dev_set_name()
Kay Sievers [Tue, 6 Jan 2009 18:44:42 +0000 (10:44 -0800)]
dmi: struct device - replace bus_id with dev_name(), dev_set_name()

CC: Lennart Poettering <mzxreary@0pointer.de>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agogadget: struct device - replace bus_id with dev_name(), dev_set_name()
Kay Sievers [Tue, 6 Jan 2009 18:44:42 +0000 (10:44 -0800)]
gadget: struct device - replace bus_id with dev_name(), dev_set_name()

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agogpio: struct device - replace bus_id with dev_name(), dev_set_name()
Kay Sievers [Tue, 6 Jan 2009 18:44:42 +0000 (10:44 -0800)]
gpio: struct device - replace bus_id with dev_name(), dev_set_name()

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agogpu: struct device - replace bus_id with dev_name(), dev_set_name()
Kay Sievers [Tue, 6 Jan 2009 18:44:41 +0000 (10:44 -0800)]
gpu: struct device - replace bus_id with dev_name(), dev_set_name()

CC: Dave Airlie <airlied@redhat.com>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agohwmon: struct device - replace bus_id with dev_name(), dev_set_name()
Kay Sievers [Tue, 6 Jan 2009 18:44:41 +0000 (10:44 -0800)]
hwmon: struct device - replace bus_id with dev_name(), dev_set_name()

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoi2o: struct device - replace bus_id with dev_name(), dev_set_name()
Kay Sievers [Tue, 6 Jan 2009 18:44:40 +0000 (10:44 -0800)]
i2o: struct device - replace bus_id with dev_name(), dev_set_name()

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoIA64: struct device - replace bus_id with dev_name(), dev_set_name()
Kay Sievers [Tue, 6 Jan 2009 18:44:40 +0000 (10:44 -0800)]
IA64: struct device - replace bus_id with dev_name(), dev_set_name()

Cc: Tony Luck <tony.luck@intel.com>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoi7300_idle: struct device - replace bus_id with dev_name(), dev_set_name()
Kay Sievers [Tue, 6 Jan 2009 18:44:39 +0000 (10:44 -0800)]
i7300_idle: struct device - replace bus_id with dev_name(), dev_set_name()

CC: Andy Henroid <andrew.d.henroid@intel.com>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoinfiniband: struct device - replace bus_id with dev_name(), dev_set_name()
Kay Sievers [Tue, 6 Jan 2009 18:44:39 +0000 (10:44 -0800)]
infiniband: struct device - replace bus_id with dev_name(), dev_set_name()

Acked-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoISDN: struct device - replace bus_id with dev_name(), dev_set_name()
Kay Sievers [Tue, 6 Jan 2009 18:44:39 +0000 (10:44 -0800)]
ISDN: struct device - replace bus_id with dev_name(), dev_set_name()

CC: Karsten Keil <kkeil@suse.de>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agopm: struct device - replace bus_id with dev_name(), dev_set_name()
Kay Sievers [Tue, 6 Jan 2009 18:44:39 +0000 (10:44 -0800)]
pm: struct device - replace bus_id with dev_name(), dev_set_name()

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agomacintosh: struct device - replace bus_id with dev_name(), dev_set_name()
Kay Sievers [Tue, 6 Jan 2009 18:44:39 +0000 (10:44 -0800)]
macintosh: struct device - replace bus_id with dev_name(), dev_set_name()

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agomemstick: struct device - replace bus_id with dev_name(), dev_set_name()
Kay Sievers [Tue, 6 Jan 2009 18:44:38 +0000 (10:44 -0800)]
memstick: struct device - replace bus_id with dev_name(), dev_set_name()

Cc: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agomips: struct device - replace bus_id with dev_name(), dev_set_name()
Kay Sievers [Tue, 6 Jan 2009 18:44:38 +0000 (10:44 -0800)]
mips: struct device - replace bus_id with dev_name(), dev_set_name()

Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agomtd: struct device - replace bus_id with dev_name(), dev_set_name()
Kay Sievers [Tue, 6 Jan 2009 18:44:38 +0000 (10:44 -0800)]
mtd: struct device - replace bus_id with dev_name(), dev_set_name()

CC: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agomwave: struct device - replace bus_id with dev_name(), dev_set_name()
Kay Sievers [Tue, 6 Jan 2009 18:44:38 +0000 (10:44 -0800)]
mwave: struct device - replace bus_id with dev_name(), dev_set_name()

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agopnp: struct device - replace bus_id with dev_name(), dev_set_name()
Kay Sievers [Tue, 6 Jan 2009 18:44:38 +0000 (10:44 -0800)]
pnp: struct device - replace bus_id with dev_name(), dev_set_name()

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agopower-supply: struct device - replace bus_id with dev_name(), dev_set_name()
Kay Sievers [Tue, 6 Jan 2009 18:44:38 +0000 (10:44 -0800)]
power-supply: struct device - replace bus_id with dev_name(), dev_set_name()

CC: Anton Vorontsov <cbouatmailru@gmail.com>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoserial: struct device - replace bus_id with dev_name(), dev_set_name()
Kay Sievers [Tue, 6 Jan 2009 18:44:37 +0000 (10:44 -0800)]
serial: struct device - replace bus_id with dev_name(), dev_set_name()

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoSGI: struct device - replace bus_id with dev_name(), dev_set_name()
Kay Sievers [Tue, 6 Jan 2009 18:44:37 +0000 (10:44 -0800)]
SGI: struct device - replace bus_id with dev_name(), dev_set_name()

CC: Jack Steiner <steiner@sgi.com>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agospi: struct device - replace bus_id with dev_name(), dev_set_name()
Kay Sievers [Tue, 6 Jan 2009 18:44:37 +0000 (10:44 -0800)]
spi: struct device - replace bus_id with dev_name(), dev_set_name()

Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoswiotlb: struct device - replace bus_id with dev_name(), dev_set_name()
Kay Sievers [Tue, 6 Jan 2009 18:44:37 +0000 (10:44 -0800)]
swiotlb: struct device - replace bus_id with dev_name(), dev_set_name()

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agothermal: struct device - replace bus_id with dev_name(), dev_set_name()
Kay Sievers [Tue, 6 Jan 2009 18:44:37 +0000 (10:44 -0800)]
thermal: struct device - replace bus_id with dev_name(), dev_set_name()

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agotifm: struct device - replace bus_id with dev_name(), dev_set_name()
Kay Sievers [Tue, 6 Jan 2009 18:44:35 +0000 (10:44 -0800)]
tifm: struct device - replace bus_id with dev_name(), dev_set_name()

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agovideo: struct device - replace bus_id with dev_name(), dev_set_name()
Kay Sievers [Tue, 6 Jan 2009 18:44:35 +0000 (10:44 -0800)]
video: struct device - replace bus_id with dev_name(), dev_set_name()

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agow1: struct device - replace bus_id with dev_name(), dev_set_name()
Kay Sievers [Tue, 6 Jan 2009 18:44:34 +0000 (10:44 -0800)]
w1: struct device - replace bus_id with dev_name(), dev_set_name()

CC: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoxen: struct device - replace bus_id with dev_name(), dev_set_name()
Kay Sievers [Tue, 6 Jan 2009 18:44:34 +0000 (10:44 -0800)]
xen: struct device - replace bus_id with dev_name(), dev_set_name()

CC: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agos390: remove s390_root_dev_*()
Mark McLoughlin [Mon, 15 Dec 2008 12:58:29 +0000 (12:58 +0000)]
s390: remove s390_root_dev_*()

Replace s390_root_dev_register() with root_device_register() etc.

[Includes fix from Cornelia Huck]

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agolguest: do not statically allocate root device
Mark McLoughlin [Mon, 15 Dec 2008 12:58:28 +0000 (12:58 +0000)]
lguest: do not statically allocate root device

We shouldn't be statically allocating the root device object,
so dynamically allocate it using root_device_register()
instead.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agovirtio: do not statically allocate root device
Mark McLoughlin [Mon, 15 Dec 2008 12:58:27 +0000 (12:58 +0000)]
virtio: do not statically allocate root device

We shouldn't be statically allocating the root device object,
so dynamically allocate it using root_device_register()
instead.

Also avoids this warning from 'rmmod virtio_pci':

  Device 'virtio-pci' does not have a release() function, it is broken and must be fixed

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Cc: Anthony Liguori <aliguori@us.ibm.com>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agodriver core: add root_device_register()
Mark McLoughlin [Mon, 15 Dec 2008 12:58:26 +0000 (12:58 +0000)]
driver core: add root_device_register()

Add support for allocating root device objects which group
device objects under /sys/devices directories.

Also add a sysfs 'module' symlink which points to the owner
of the root device object. This symlink will be used in virtio
to allow userspace to determine which virtio bus implementation
a given device is associated with.

[Includes suggestions from Cornelia Huck]

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agodriver core:fix duplicate removing driver link in __device_release_driver
Ming Lei [Wed, 17 Dec 2008 15:15:35 +0000 (23:15 +0800)]
driver core:fix duplicate removing driver link in __device_release_driver

In __device_release_driver(),driver_sysfs_remove() has removed the
driver link under device dir in sysfs, but sysfs_remove_link() is
called again to do such thing. Remove the duplicate call to
sys_remove_link().

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoDriver core: move the bus notifier call points
Alan Stern [Fri, 5 Dec 2008 19:10:31 +0000 (14:10 -0500)]
Driver core: move the bus notifier call points

This patch (as1184) changes the location of the notifications in
device_add() and device_del().  Now the BUS_NOTIFY_ADD_DEVICE message
is sent after dpm_sysfs_add(), which is necessary for clients that
want to add attributes to the power/ subdirectory.  The
BUS_NOTIFY_DEL_DEVICE message is correspondingly moved before
dpm_sysfs_remove().

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoMake DEBUG take precedence over DYNAMIC_PRINTK_DEBUG
Cornelia Huck [Thu, 4 Dec 2008 15:55:47 +0000 (16:55 +0100)]
Make DEBUG take precedence over DYNAMIC_PRINTK_DEBUG

Statically defined DEBUG should take precedence over
dynamically enabled debugging; otherwise adding DEBUG
(like, for example, via CONFIG_DEBUG_KOBJECT) does not
have the expected result of printing pr_debug() and dev_dbg()
messages unconditionally.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Acked-by: Jason Baron <jbaron@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agodriver core: move knode_bus into private structure
Greg Kroah-Hartman [Tue, 16 Dec 2008 20:26:21 +0000 (12:26 -0800)]
driver core: move knode_bus into private structure

Nothing outside of the driver core should ever touch knode_bus, so
move it out of the public eye.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agodriver core: move knode_driver into private structure
Greg Kroah-Hartman [Tue, 16 Dec 2008 20:25:49 +0000 (12:25 -0800)]
driver core: move knode_driver into private structure

Nothing outside of the driver core should ever touch knode_driver, so
move it out of the public eye.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agodriver core: move klist_children into private structure
Greg Kroah-Hartman [Tue, 16 Dec 2008 20:24:56 +0000 (12:24 -0800)]
driver core: move klist_children into private structure

Nothing outside of the driver core should ever touch klist_children, or
knode_parent, so move them out of the public eye.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agodriver core: create a private portion of struct device
Greg Kroah-Hartman [Tue, 16 Dec 2008 20:23:36 +0000 (12:23 -0800)]
driver core: create a private portion of struct device

This is to be used to move things out of struct device that no code
outside of the driver core should ever touch.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agodynamic_printk: reduce one level of indentation
Wu Fengguang [Wed, 10 Dec 2008 23:43:17 +0000 (07:43 +0800)]
dynamic_printk: reduce one level of indentation

Cleanup pr_debug_write() to reduce one level of indentation.

Cc: Marcel Holtmann <marcel@holtmann.org>
Acked-by: Jason Baron <jbaron@redhat.com>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agokobject: Make Documentation/kobject.txt a little more coherent.
Rusty Russell [Mon, 8 Dec 2008 22:02:14 +0000 (08:32 +1030)]
kobject: Make Documentation/kobject.txt a little more coherent.

While reading Documentation/kobject.txt:

  Note kobject_rename does perform any locking or have a solid notion of
  what names are valid so the provide must provide their own sanity checking
  and serialization.

I expect better: You never see me hard with time word making sentence
coherent stuff.  Ever.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoPCI: Rework default handling of suspend and resume
Rafael J. Wysocki [Sun, 7 Dec 2008 23:34:57 +0000 (00:34 +0100)]
PCI: Rework default handling of suspend and resume

Rework the handling of suspend and resume of PCI devices which have
no drivers or the drivers of which do not provide any suspend-resume
callbacks in such a way that their standard PCI configuration
registers will be saved and restored with interrupts disabled.  This
should prevent such devices, including PCI bridges, from being
resumed too late to be able to function correctly during the resume
of the other PCI devices that may depend on them.

Also, to remove one possible source of future confusion, drop the
default handling of suspend and resume for PCI devices with drivers
providing the 'pm' object introduced by the new suspend-resume
framework (there are no such PCI drivers at the moment).

This patch addresses the regression from 2.6.26 tracked as
http://bugzilla.kernel.org/show_bug.cgi?id=12121 .

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agokernel/ksysfs.c:fix dependence on CONFIG_NET
Ming Lei [Sun, 16 Nov 2008 10:22:09 +0000 (18:22 +0800)]
kernel/ksysfs.c:fix dependence on CONFIG_NET

Access to uevent_seqnum and uevent_helper does not need to
depend on CONFIG_NET, so remove it.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agokobject: return the result of uevent sending by netlink
Ming Lei [Sun, 16 Nov 2008 10:23:27 +0000 (18:23 +0800)]
kobject: return the result of uevent sending by netlink

We need to return the result of uevent sending by netlink
to caller, when uevent_helper is disabled and CONFIG_NET
is defined.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agouevent: don't pass envp_ext[] as format string in kobject_uevent_env()
Tejun Heo [Thu, 13 Nov 2008 04:20:00 +0000 (13:20 +0900)]
uevent: don't pass envp_ext[] as format string in kobject_uevent_env()

kobject_uevent_env() uses envp_ext[] as verbatim format string which
can cause problems ranging from unexpectedly mangled string to oops if
a string in envp_ext[] contains substring which can be interpreted as
format.  Fix it.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agosysfs: clarify SYSFS_DEPRECATED help text
Kay Sievers [Sat, 1 Nov 2008 13:03:00 +0000 (14:03 +0100)]
sysfs: clarify SYSFS_DEPRECATED help text

This should make the help text of SYSFS_DEPRECATED more clear, that this
is _not_ about (what some people think it is) suppressing a few symlinks
and variables, but a different sysfs _layout_ with new features.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agodriver core: struct device - replace bus_id with dev_name(), dev_set_name()
Kay Sievers [Thu, 30 Oct 2008 00:36:48 +0000 (01:36 +0100)]
driver core: struct device - replace bus_id with dev_name(), dev_set_name()

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>