Skip to content

Commit

Permalink
rwsem: Cleanup includes
Browse files Browse the repository at this point in the history
All rwsem implementations include the same headers. Include them from
include/linux/rwsem.h

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: David Howells <dhowells@redhat.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Matt Turner <mattst88@gmail.com>
Acked-by: Tony Luck <tony.luck@intel.com>
Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Acked-by: David Miller <davem@davemloft.net>
Cc: Chris Zankel <chris@zankel.net>
LKML-Reference: <20110126195833.483520950@linutronix.de>
  • Loading branch information
KAGA-KOKO committed Jan 27, 2011
1 parent d04fa5a commit c16a87c
Show file tree
Hide file tree
Showing 10 changed files with 3 additions and 48 deletions.
4 changes: 0 additions & 4 deletions arch/alpha/include/asm/rwsem.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@
#ifdef __KERNEL__

#include <linux/compiler.h>
#include <linux/list.h>
#include <linux/spinlock.h>

struct rwsem_waiter;

extern struct rw_semaphore *rwsem_down_read_failed(struct rw_semaphore *sem);
extern struct rw_semaphore *rwsem_down_write_failed(struct rw_semaphore *sem);
Expand Down
3 changes: 0 additions & 3 deletions arch/ia64/include/asm/rwsem.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@
#error "Please don't include <asm/rwsem.h> directly, use <linux/rwsem.h> instead."
#endif

#include <linux/list.h>
#include <linux/spinlock.h>

#include <asm/intrinsics.h>

/*
Expand Down
5 changes: 0 additions & 5 deletions arch/powerpc/include/asm/rwsem.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@
* by Paul Mackerras <paulus@samba.org>.
*/

#include <linux/list.h>
#include <linux/spinlock.h>
#include <asm/atomic.h>
#include <asm/system.h>

/*
* the semaphore definition
*/
Expand Down
5 changes: 0 additions & 5 deletions arch/s390/include/asm/rwsem.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,6 @@

#ifdef __KERNEL__

#include <linux/list.h>
#include <linux/spinlock.h>

struct rwsem_waiter;

extern struct rw_semaphore *rwsem_down_read_failed(struct rw_semaphore *);
extern struct rw_semaphore *rwsem_down_write_failed(struct rw_semaphore *);
extern struct rw_semaphore *rwsem_wake(struct rw_semaphore *);
Expand Down
5 changes: 0 additions & 5 deletions arch/sh/include/asm/rwsem.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@
#endif

#ifdef __KERNEL__
#include <linux/list.h>
#include <linux/spinlock.h>
#include <asm/atomic.h>
#include <asm/system.h>

/*
* the semaphore definition
*/
Expand Down
6 changes: 0 additions & 6 deletions arch/sparc/include/asm/rwsem.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@
#endif

#ifdef __KERNEL__

#include <linux/list.h>
#include <linux/spinlock.h>

struct rwsem_waiter;

struct rw_semaphore {
signed long count;
#define RWSEM_UNLOCKED_VALUE 0x00000000L
Expand Down
6 changes: 0 additions & 6 deletions arch/x86/include/asm/rwsem.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,8 @@
#endif

#ifdef __KERNEL__

#include <linux/list.h>
#include <linux/spinlock.h>
#include <linux/lockdep.h>
#include <asm/asm.h>

struct rwsem_waiter;

extern asmregparm struct rw_semaphore *
rwsem_down_read_failed(struct rw_semaphore *sem);
extern asmregparm struct rw_semaphore *
Expand Down
6 changes: 0 additions & 6 deletions arch/xtensa/include/asm/rwsem.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@
#ifndef _LINUX_RWSEM_H
#error "Please don't include <asm/rwsem.h> directly, use <linux/rwsem.h> instead."
#endif

#include <linux/list.h>
#include <linux/spinlock.h>
#include <asm/atomic.h>
#include <asm/system.h>

/*
* the semaphore definition
*/
Expand Down
8 changes: 0 additions & 8 deletions include/linux/rwsem-spinlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,7 @@
#error "please don't include linux/rwsem-spinlock.h directly, use linux/rwsem.h instead"
#endif

#include <linux/spinlock.h>
#include <linux/list.h>

#ifdef __KERNEL__

#include <linux/types.h>

struct rwsem_waiter;

/*
* the rw-semaphore definition
* - if activity is 0 then there are no active readers or writers
Expand Down
3 changes: 3 additions & 0 deletions include/linux/rwsem.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@

#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/list.h>
#include <linux/spinlock.h>

#include <asm/system.h>
#include <asm/atomic.h>

Expand Down

0 comments on commit c16a87c

Please sign in to comment.