From 059fbd6a5ee9a35ac9f15edb2876a50bd88a008d Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Tue, 3 Oct 2006 13:12:38 +0900 Subject: sh: Kill off more dead headers. Some old rtc and io headers were left hanging around, kill them off.. Signed-off-by: Paul Mundt --- include/asm-sh/cpu-sh3/rtc.h | 25 ------------------------- include/asm-sh/cpu-sh4/rtc.h | 25 ------------------------- include/asm-sh/hs7751rvoip/io.h | 39 --------------------------------------- include/asm-sh/rts7751r2d/io.h | 37 ------------------------------------- 4 files changed, 126 deletions(-) delete mode 100644 include/asm-sh/cpu-sh3/rtc.h delete mode 100644 include/asm-sh/cpu-sh4/rtc.h delete mode 100644 include/asm-sh/hs7751rvoip/io.h delete mode 100644 include/asm-sh/rts7751r2d/io.h (limited to 'include') diff --git a/include/asm-sh/cpu-sh3/rtc.h b/include/asm-sh/cpu-sh3/rtc.h deleted file mode 100644 index 2d926671115a..000000000000 --- a/include/asm-sh/cpu-sh3/rtc.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef __ASM_CPU_SH3_RTC_H -#define __ASM_CPU_SH3_RTC_H - -/* SH-3 RTC */ -#define R64CNT 0xfffffec0 -#define RSECCNT 0xfffffec2 -#define RMINCNT 0xfffffec4 -#define RHRCNT 0xfffffec6 -#define RWKCNT 0xfffffec8 -#define RDAYCNT 0xfffffeca -#define RMONCNT 0xfffffecc -#define RYRCNT 0xfffffece -#define RSECAR 0xfffffed0 -#define RMINAR 0xfffffed2 -#define RHRAR 0xfffffed4 -#define RWKAR 0xfffffed6 -#define RDAYAR 0xfffffed8 -#define RMONAR 0xfffffeda -#define RCR1 0xfffffedc -#define RCR2 0xfffffede - -#define RTC_BIT_INVERTED 0 /* No bug on SH7708, SH7709A */ - -#endif /* __ASM_CPU_SH3_RTC_H */ - diff --git a/include/asm-sh/cpu-sh4/rtc.h b/include/asm-sh/cpu-sh4/rtc.h deleted file mode 100644 index e091e32a67b7..000000000000 --- a/include/asm-sh/cpu-sh4/rtc.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef __ASM_CPU_SH4_RTC_H -#define __ASM_CPU_SH4_RTC_H - -/* SH-4 RTC */ -#define R64CNT 0xffc80000 -#define RSECCNT 0xffc80004 -#define RMINCNT 0xffc80008 -#define RHRCNT 0xffc8000c -#define RWKCNT 0xffc80010 -#define RDAYCNT 0xffc80014 -#define RMONCNT 0xffc80018 -#define RYRCNT 0xffc8001c /* 16bit */ -#define RSECAR 0xffc80020 -#define RMINAR 0xffc80024 -#define RHRAR 0xffc80028 -#define RWKAR 0xffc8002c -#define RDAYAR 0xffc80030 -#define RMONAR 0xffc80034 -#define RCR1 0xffc80038 -#define RCR2 0xffc8003c - -#define RTC_BIT_INVERTED 0x40 /* bug on SH7750, SH7750S */ - -#endif /* __ASM_CPU_SH4_RTC_H */ - diff --git a/include/asm-sh/hs7751rvoip/io.h b/include/asm-sh/hs7751rvoip/io.h deleted file mode 100644 index 513c8514001b..000000000000 --- a/include/asm-sh/hs7751rvoip/io.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * include/asm-sh/hs7751rvoip/hs7751rvoip.h - * - * Modified version of io_se.h for the hs7751rvoip-specific functions. - * - * May be copied or modified under the terms of the GNU General Public - * License. See linux/COPYING for more information. - * - * IO functions for an Renesas Technology sales HS7751RVOIP - */ - -#ifndef _ASM_SH_IO_HS7751RVOIP_H -#define _ASM_SH_IO_HS7751RVOIP_H - -#include - -extern unsigned char hs7751rvoip_inb(unsigned long port); -extern unsigned short hs7751rvoip_inw(unsigned long port); -extern unsigned int hs7751rvoip_inl(unsigned long port); - -extern void hs7751rvoip_outb(unsigned char value, unsigned long port); -extern void hs7751rvoip_outw(unsigned short value, unsigned long port); -extern void hs7751rvoip_outl(unsigned int value, unsigned long port); - -extern unsigned char hs7751rvoip_inb_p(unsigned long port); -extern void hs7751rvoip_outb_p(unsigned char value, unsigned long port); - -extern void hs7751rvoip_insb(unsigned long port, void *addr, unsigned long count); -extern void hs7751rvoip_insw(unsigned long port, void *addr, unsigned long count); -extern void hs7751rvoip_insl(unsigned long port, void *addr, unsigned long count); -extern void hs7751rvoip_outsb(unsigned long port, const void *addr, unsigned long count); -extern void hs7751rvoip_outsw(unsigned long port, const void *addr, unsigned long count); -extern void hs7751rvoip_outsl(unsigned long port, const void *addr, unsigned long count); - -extern void *hs7751rvoip_ioremap(unsigned long offset, unsigned long size); - -extern unsigned long hs7751rvoip_isa_port2addr(unsigned long offset); - -#endif /* _ASM_SH_IO_HS7751RVOIP_H */ diff --git a/include/asm-sh/rts7751r2d/io.h b/include/asm-sh/rts7751r2d/io.h deleted file mode 100644 index 241094020567..000000000000 --- a/include/asm-sh/rts7751r2d/io.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * include/asm-sh/io_rts7751r2d.h - * - * Modified version of io_se.h for the rts7751r2d-specific functions. - * - * May be copied or modified under the terms of the GNU General Public - * License. See linux/COPYING for more information. - * - * IO functions for an Renesas Technology sales RTS7751R2D - */ - -#ifndef _ASM_SH_IO_RTS7751R2D_H -#define _ASM_SH_IO_RTS7751R2D_H - -extern unsigned char rts7751r2d_inb(unsigned long port); -extern unsigned short rts7751r2d_inw(unsigned long port); -extern unsigned int rts7751r2d_inl(unsigned long port); - -extern void rts7751r2d_outb(unsigned char value, unsigned long port); -extern void rts7751r2d_outw(unsigned short value, unsigned long port); -extern void rts7751r2d_outl(unsigned int value, unsigned long port); - -extern unsigned char rts7751r2d_inb_p(unsigned long port); -extern void rts7751r2d_outb_p(unsigned char value, unsigned long port); - -extern void rts7751r2d_insb(unsigned long port, void *addr, unsigned long count); -extern void rts7751r2d_insw(unsigned long port, void *addr, unsigned long count); -extern void rts7751r2d_insl(unsigned long port, void *addr, unsigned long count); -extern void rts7751r2d_outsb(unsigned long port, const void *addr, unsigned long count); -extern void rts7751r2d_outsw(unsigned long port, const void *addr, unsigned long count); -extern void rts7751r2d_outsl(unsigned long port, const void *addr, unsigned long count); - -extern void *rts7751r2d_ioremap(unsigned long offset, unsigned long size); - -extern unsigned long rts7751r2d_isa_port2addr(unsigned long offset); - -#endif /* _ASM_SH_IO_RTS7751R2D_H */ -- cgit v1.3-8-gc7d7 From 711fa8096863e4b50bb97f9ebc44606dc2182ac3 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Tue, 3 Oct 2006 13:14:04 +0900 Subject: sh: build fixes for defconfigs. Get all of the defconfigs building again. Signed-off-by: Paul Mundt --- arch/sh/boards/landisk/irq.c | 2 +- arch/sh/boards/renesas/r7780rp/irq.c | 2 +- arch/sh/boards/renesas/systemh/setup.c | 2 +- arch/sh/boards/se/7343/irq.c | 2 +- arch/sh/boards/se/770x/setup.c | 7 ++----- arch/sh/boards/se/7751/setup.c | 6 ++---- arch/sh/boards/sh03/setup.c | 1 + arch/sh/drivers/dma/dma-sysfs.c | 8 +++----- arch/sh/drivers/pci/ops-sh03.c | 4 ++-- arch/sh/kernel/entry.S | 6 +----- arch/sh/kernel/setup.c | 4 ++-- arch/sh/kernel/sh_ksyms.c | 1 + arch/sh/mm/cache-debugfs.c | 2 +- include/asm-sh/elf.h | 1 - include/asm-sh/rts7751r2d/rts7751r2d.h | 3 +++ include/asm-sh/string.h | 15 +++++++++++---- 16 files changed, 33 insertions(+), 33 deletions(-) (limited to 'include') diff --git a/arch/sh/boards/landisk/irq.c b/arch/sh/boards/landisk/irq.c index a006d6443225..5891fcd80405 100644 --- a/arch/sh/boards/landisk/irq.c +++ b/arch/sh/boards/landisk/irq.c @@ -83,7 +83,7 @@ static struct hw_interrupt_type landisk_irq_type = { static void make_landisk_irq(unsigned int irq) { disable_irq_nosync(irq); - irq_desc[irq].handler = &landisk_irq_type; + irq_desc[irq].chip = &landisk_irq_type; disable_landisk_irq(irq); } diff --git a/arch/sh/boards/renesas/r7780rp/irq.c b/arch/sh/boards/renesas/r7780rp/irq.c index 61d5e5d3c294..769ae6b65123 100644 --- a/arch/sh/boards/renesas/r7780rp/irq.c +++ b/arch/sh/boards/renesas/r7780rp/irq.c @@ -83,7 +83,7 @@ static struct hw_interrupt_type r7780rp_irq_type = { static void make_r7780rp_irq(unsigned int irq) { disable_irq_nosync(irq); - irq_desc[irq].handler = &r7780rp_irq_type; + irq_desc[irq].chip = &r7780rp_irq_type; disable_r7780rp_irq(irq); } diff --git a/arch/sh/boards/renesas/systemh/setup.c b/arch/sh/boards/renesas/systemh/setup.c index a8467bf90c25..bab7d3cdc87b 100644 --- a/arch/sh/boards/renesas/systemh/setup.c +++ b/arch/sh/boards/renesas/systemh/setup.c @@ -53,6 +53,6 @@ struct sh_machine_vector mv_7751systemh __initmv = { .mv_outsw = sh7751systemh_outsw, .mv_outsl = sh7751systemh_outsl, - .mv_init_irq = sh7751system_init_irq, + .mv_init_irq = sh7751systemh_init_irq, }; ALIAS_MV(7751systemh) diff --git a/arch/sh/boards/se/7343/irq.c b/arch/sh/boards/se/7343/irq.c index b41e3d4ea37c..739a7b001bb7 100644 --- a/arch/sh/boards/se/7343/irq.c +++ b/arch/sh/boards/se/7343/irq.c @@ -73,7 +73,7 @@ static void make_intreq_irq(unsigned int irq) { disable_irq_nosync(irq); - irq_desc[irq].handler = &intreq_irq_type; + irq_desc[irq].chip = &intreq_irq_type; disable_intreq_irq(irq); } diff --git a/arch/sh/boards/se/770x/setup.c b/arch/sh/boards/se/770x/setup.c index f3f82b7c8217..a1d51d5fa925 100644 --- a/arch/sh/boards/se/770x/setup.c +++ b/arch/sh/boards/se/770x/setup.c @@ -8,13 +8,10 @@ * */ #include -#include -#include -#include -#include +#include #include +#include #include -#include void heartbeat_se(void); void init_se_IRQ(void); diff --git a/arch/sh/boards/se/7751/setup.c b/arch/sh/boards/se/7751/setup.c index 73e826310ba8..f7e1dd39c836 100644 --- a/arch/sh/boards/se/7751/setup.c +++ b/arch/sh/boards/se/7751/setup.c @@ -8,12 +8,10 @@ * Modified for 7751 Solution Engine by * Ian da Silva and Jeremy Siegel, 2001. */ - #include -#include -#include -#include +#include #include +#include void heartbeat_7751se(void); void init_7751se_IRQ(void); diff --git a/arch/sh/boards/sh03/setup.c b/arch/sh/boards/sh03/setup.c index 6c310587ddfe..137e2ba9243e 100644 --- a/arch/sh/boards/sh03/setup.c +++ b/arch/sh/boards/sh03/setup.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/arch/sh/drivers/dma/dma-sysfs.c b/arch/sh/drivers/dma/dma-sysfs.c index 70a5d82eb2f8..29b8ef9873d1 100644 --- a/arch/sh/drivers/dma/dma-sysfs.c +++ b/arch/sh/drivers/dma/dma-sysfs.c @@ -48,12 +48,11 @@ static int __init dma_sysclass_init(void) int ret; ret = sysdev_class_register(&dma_sysclass); - if (ret == 0) - sysfs_create_file(&dma_sysclass.kset.kobj, &attr_devices.attr); + if (unlikely(ret)) + return ret; - return ret; + return sysfs_create_file(&dma_sysclass.kset.kobj, &attr_devices.attr); } - postcore_initcall(dma_sysclass_init); static ssize_t dma_show_dev_id(struct sys_device *dev, char *buf) @@ -152,4 +151,3 @@ void dma_remove_sysfs_files(struct dma_channel *chan, struct dma_info *info) sysdev_unregister(dev); } - diff --git a/arch/sh/drivers/pci/ops-sh03.c b/arch/sh/drivers/pci/ops-sh03.c index e58d556e5f94..ebb58e605d9d 100644 --- a/arch/sh/drivers/pci/ops-sh03.c +++ b/arch/sh/drivers/pci/ops-sh03.c @@ -35,10 +35,10 @@ static struct resource sh7751_mem_resource = { .flags = IORESOURCE_MEM }; -extern struct pci_ops sh7751_pci_ops; +extern struct pci_ops sh4_pci_ops; struct pci_channel board_pci_channels[] = { - { &sh7751_pci_ops, &sh7751_io_resource, &sh7751_mem_resource, 0, 0xff }, + { &sh4_pci_ops, &sh7751_io_resource, &sh7751_mem_resource, 0, 0xff }, { NULL, NULL, NULL, 0, 0 }, }; diff --git a/arch/sh/kernel/entry.S b/arch/sh/kernel/entry.S index fe8221855b28..97c571fbcdf1 100644 --- a/arch/sh/kernel/entry.S +++ b/arch/sh/kernel/entry.S @@ -10,8 +10,8 @@ * for more details. * */ - #include +#include #include #include #include @@ -53,10 +53,6 @@ * syscall # * */ - -ENOSYS = 38 -EINVAL = 22 - #if defined(CONFIG_KGDB_NMI) NMI_VEC = 0x1c0 ! Must catch early for debounce #endif diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c index 77491cf9b259..36d86f9ac38a 100644 --- a/arch/sh/kernel/setup.c +++ b/arch/sh/kernel/setup.c @@ -1,5 +1,4 @@ -/* $Id: setup.c,v 1.30 2003/10/13 07:21:19 lethal Exp $ - * +/* * linux/arch/sh/kernel/setup.c * * Copyright (C) 1999 Niibe Yutaka @@ -21,6 +20,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/sh/kernel/sh_ksyms.c b/arch/sh/kernel/sh_ksyms.c index d3cbfa2ad4a7..9daad70bc305 100644 --- a/arch/sh/kernel/sh_ksyms.c +++ b/arch/sh/kernel/sh_ksyms.c @@ -72,6 +72,7 @@ DECLARE_EXPORT(__ashrdi3); DECLARE_EXPORT(__ashldi3); DECLARE_EXPORT(__lshrdi3); DECLARE_EXPORT(__movstr); +DECLARE_EXPORT(__movstrSI16); EXPORT_SYMBOL(strcpy); diff --git a/arch/sh/mm/cache-debugfs.c b/arch/sh/mm/cache-debugfs.c index a22d914e4d15..e0122bd33ddb 100644 --- a/arch/sh/mm/cache-debugfs.c +++ b/arch/sh/mm/cache-debugfs.c @@ -111,7 +111,7 @@ static int cache_seq_show(struct seq_file *file, void *iter) static int cache_debugfs_open(struct inode *inode, struct file *file) { - return single_open(file, cache_seq_show, inode->u.generic_ip); + return single_open(file, cache_seq_show, inode->i_private); } static struct file_operations cache_debugfs_fops = { diff --git a/include/asm-sh/elf.h b/include/asm-sh/elf.h index 3a07ab40ac4d..fc050fd7645e 100644 --- a/include/asm-sh/elf.h +++ b/include/asm-sh/elf.h @@ -1,7 +1,6 @@ #ifndef __ASM_SH_ELF_H #define __ASM_SH_ELF_H -#include #include #include #include diff --git a/include/asm-sh/rts7751r2d/rts7751r2d.h b/include/asm-sh/rts7751r2d/rts7751r2d.h index b112ae221fd1..796b8fcb81a8 100644 --- a/include/asm-sh/rts7751r2d/rts7751r2d.h +++ b/include/asm-sh/rts7751r2d/rts7751r2d.h @@ -68,4 +68,7 @@ #define IRQ_PCISLOT2 10 /* PCI Slot #2 IRQ */ #define IRQ_EXTENTION 11 /* EXTn IRQ */ +#define __IO_PREFIX rts7751r2d +#include + #endif /* __ASM_SH_RENESAS_RTS7751R2D */ diff --git a/include/asm-sh/string.h b/include/asm-sh/string.h index 3e0cff04caec..95bc7db006b0 100644 --- a/include/asm-sh/string.h +++ b/include/asm-sh/string.h @@ -1,13 +1,15 @@ #ifndef __ASM_SH_STRING_H #define __ASM_SH_STRING_H +#ifdef __KERNEL__ + /* * Copyright (C) 1999 Niibe Yutaka * But consider these trivial functions to be public domain. */ #define __HAVE_ARCH_STRCPY -static __inline__ char *strcpy(char *__dest, const char *__src) +static inline char *strcpy(char *__dest, const char *__src) { register char *__xdest = __dest; unsigned long __dummy; @@ -26,7 +28,7 @@ static __inline__ char *strcpy(char *__dest, const char *__src) } #define __HAVE_ARCH_STRNCPY -static __inline__ char *strncpy(char *__dest, const char *__src, size_t __n) +static inline char *strncpy(char *__dest, const char *__src, size_t __n) { register char *__xdest = __dest; unsigned long __dummy; @@ -52,7 +54,7 @@ static __inline__ char *strncpy(char *__dest, const char *__src, size_t __n) } #define __HAVE_ARCH_STRCMP -static __inline__ int strcmp(const char *__cs, const char *__ct) +static inline int strcmp(const char *__cs, const char *__ct) { register int __res; unsigned long __dummy; @@ -78,7 +80,7 @@ static __inline__ int strcmp(const char *__cs, const char *__ct) } #define __HAVE_ARCH_STRNCMP -static __inline__ int strncmp(const char *__cs, const char *__ct, size_t __n) +static inline int strncmp(const char *__cs, const char *__ct, size_t __n) { register int __res; unsigned long __dummy; @@ -124,4 +126,9 @@ extern void *memchr(const void *__s, int __c, size_t __n); #define __HAVE_ARCH_STRLEN extern size_t strlen(const char *); +/* arch/sh/lib/strcasecmp.c */ +extern int strcasecmp(const char *, const char *); + +#endif /* __KERNEL__ */ + #endif /* __ASM_SH_STRING_H */ -- cgit v1.3-8-gc7d7 From 3e6c999de9a5438c97524a62845da8da78923205 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Tue, 3 Oct 2006 13:16:15 +0900 Subject: sh: Initial gitignore list Ignore build-time generated files. Signed-off-by: Paul Mundt --- arch/sh/boot/.gitignore | 1 + arch/sh/kernel/vsyscall/.gitignore | 1 + include/asm-sh/.gitignore | 3 +++ 3 files changed, 5 insertions(+) create mode 100644 arch/sh/boot/.gitignore create mode 100644 arch/sh/kernel/vsyscall/.gitignore create mode 100644 include/asm-sh/.gitignore (limited to 'include') diff --git a/arch/sh/boot/.gitignore b/arch/sh/boot/.gitignore new file mode 100644 index 000000000000..b6718de23693 --- /dev/null +++ b/arch/sh/boot/.gitignore @@ -0,0 +1 @@ +zImage diff --git a/arch/sh/kernel/vsyscall/.gitignore b/arch/sh/kernel/vsyscall/.gitignore new file mode 100644 index 000000000000..40836ad9079c --- /dev/null +++ b/arch/sh/kernel/vsyscall/.gitignore @@ -0,0 +1 @@ +vsyscall.lds diff --git a/include/asm-sh/.gitignore b/include/asm-sh/.gitignore new file mode 100644 index 000000000000..9218ef82b698 --- /dev/null +++ b/include/asm-sh/.gitignore @@ -0,0 +1,3 @@ +cpu +mach +machtypes.h -- cgit v1.3-8-gc7d7 From 2914d4da172f53f71d0563d3c3bae14e496cbc86 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Tue, 3 Oct 2006 13:19:02 +0900 Subject: sh: Kill off remaining config.h references. A few of these managed to sneak back in, get rid of them once and for all. Signed-off-by: Paul Mundt --- arch/sh/boards/hp6xx/hp6xx_apm.c | 1 - arch/sh/boards/hp6xx/pm.c | 1 - arch/sh/boards/landisk/irq.c | 2 -- arch/sh/boards/landisk/landisk_pwb.c | 2 -- arch/sh/boards/landisk/rtc.c | 2 -- arch/sh/boards/landisk/setup.c | 1 - arch/sh/boards/renesas/r7780rp/irq.c | 2 -- arch/sh/boards/renesas/r7780rp/led.c | 2 -- arch/sh/boards/se/7343/io.c | 2 -- arch/sh/boards/se/7343/irq.c | 2 -- arch/sh/boards/se/7343/led.c | 2 -- arch/sh/boards/se/7343/setup.c | 1 - arch/sh/drivers/pci/ops-landisk.c | 1 - arch/sh/drivers/pci/ops-r7780rp.c | 2 -- arch/sh/drivers/pci/ops-titan.c | 2 -- arch/sh/drivers/pci/pci-sh7780.c | 2 -- arch/sh/kernel/apm.c | 1 - arch/sh/math-emu/math.c | 1 - arch/sh/tools/gen-mach-types | 2 -- include/asm-sh/sfp-machine.h | 2 -- 20 files changed, 33 deletions(-) (limited to 'include') diff --git a/arch/sh/boards/hp6xx/hp6xx_apm.c b/arch/sh/boards/hp6xx/hp6xx_apm.c index ad0e712c29f6..75f91aaae077 100644 --- a/arch/sh/boards/hp6xx/hp6xx_apm.c +++ b/arch/sh/boards/hp6xx/hp6xx_apm.c @@ -6,7 +6,6 @@ * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License. */ -#include #include #include #include diff --git a/arch/sh/boards/hp6xx/pm.c b/arch/sh/boards/hp6xx/pm.c index 0e501bcbd7a9..83d327212064 100644 --- a/arch/sh/boards/hp6xx/pm.c +++ b/arch/sh/boards/hp6xx/pm.c @@ -6,7 +6,6 @@ * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License. */ -#include #include #include #include diff --git a/arch/sh/boards/landisk/irq.c b/arch/sh/boards/landisk/irq.c index 5891fcd80405..8f2e1c68b90f 100644 --- a/arch/sh/boards/landisk/irq.c +++ b/arch/sh/boards/landisk/irq.c @@ -14,8 +14,6 @@ * modified by kogiidena * 2005.03.03 */ - -#include #include #include #include diff --git a/arch/sh/boards/landisk/landisk_pwb.c b/arch/sh/boards/landisk/landisk_pwb.c index e75cb578a28b..0b7bee1a9ca5 100644 --- a/arch/sh/boards/landisk/landisk_pwb.c +++ b/arch/sh/boards/landisk/landisk_pwb.c @@ -11,8 +11,6 @@ * * LED control drive function added by kogiidena */ - -#include #include #include #include diff --git a/arch/sh/boards/landisk/rtc.c b/arch/sh/boards/landisk/rtc.c index 35ba726a0979..0a9a2a2ad05b 100644 --- a/arch/sh/boards/landisk/rtc.c +++ b/arch/sh/boards/landisk/rtc.c @@ -8,8 +8,6 @@ * modifed by kogiidena * 2005.09.16 */ - -#include #include #include #include diff --git a/arch/sh/boards/landisk/setup.c b/arch/sh/boards/landisk/setup.c index 127b9e020e00..122d69962637 100644 --- a/arch/sh/boards/landisk/setup.c +++ b/arch/sh/boards/landisk/setup.c @@ -16,7 +16,6 @@ * License. See the file "COPYING" in the main directory of this archive * for more details. */ -#include #include #include #include diff --git a/arch/sh/boards/renesas/r7780rp/irq.c b/arch/sh/boards/renesas/r7780rp/irq.c index 769ae6b65123..2d960e9a3143 100644 --- a/arch/sh/boards/renesas/r7780rp/irq.c +++ b/arch/sh/boards/renesas/r7780rp/irq.c @@ -8,8 +8,6 @@ * Modified for R7780RP-1 by * Atom Create Engineering Co., Ltd. 2002. */ - -#include #include #include #include diff --git a/arch/sh/boards/renesas/r7780rp/led.c b/arch/sh/boards/renesas/r7780rp/led.c index 9f02766b6f53..6a00a257afd2 100644 --- a/arch/sh/boards/renesas/r7780rp/led.c +++ b/arch/sh/boards/renesas/r7780rp/led.c @@ -6,8 +6,6 @@ * * This file contains Renesas Solutions HIGHLANDER R7780RP-1 specific LED code. */ - -#include #include #include #include diff --git a/arch/sh/boards/se/7343/io.c b/arch/sh/boards/se/7343/io.c index 646661a146ad..3a6d11424938 100644 --- a/arch/sh/boards/se/7343/io.c +++ b/arch/sh/boards/se/7343/io.c @@ -4,8 +4,6 @@ * I/O routine for SH-Mobile3AS 7343 SolutionEngine. * */ - -#include #include #include #include diff --git a/arch/sh/boards/se/7343/irq.c b/arch/sh/boards/se/7343/irq.c index 739a7b001bb7..288b62f59419 100644 --- a/arch/sh/boards/se/7343/irq.c +++ b/arch/sh/boards/se/7343/irq.c @@ -2,8 +2,6 @@ * arch/sh/boards/se/7343/irq.c * */ - -#include #include #include #include diff --git a/arch/sh/boards/se/7343/led.c b/arch/sh/boards/se/7343/led.c index 6a439cf83e46..6b39e191c420 100644 --- a/arch/sh/boards/se/7343/led.c +++ b/arch/sh/boards/se/7343/led.c @@ -2,8 +2,6 @@ * arch/sh/boards/se/7343/led.c * */ - -#include #include #include diff --git a/arch/sh/boards/se/7343/setup.c b/arch/sh/boards/se/7343/setup.c index 787322291fb3..c7d17fe7764e 100644 --- a/arch/sh/boards/se/7343/setup.c +++ b/arch/sh/boards/se/7343/setup.c @@ -1,4 +1,3 @@ -#include #include #include #include diff --git a/arch/sh/drivers/pci/ops-landisk.c b/arch/sh/drivers/pci/ops-landisk.c index ada301c21fe7..d06030815a96 100644 --- a/arch/sh/drivers/pci/ops-landisk.c +++ b/arch/sh/drivers/pci/ops-landisk.c @@ -8,7 +8,6 @@ * May be copied or modified under the terms of the GNU General Public * License. See linux/COPYING for more information. */ -#include #include #include #include diff --git a/arch/sh/drivers/pci/ops-r7780rp.c b/arch/sh/drivers/pci/ops-r7780rp.c index 554d5ed2c586..6e3ba9c65b40 100644 --- a/arch/sh/drivers/pci/ops-r7780rp.c +++ b/arch/sh/drivers/pci/ops-r7780rp.c @@ -8,8 +8,6 @@ * * PCI initialization for the Renesas SH7780 Highlander R7780RP-1 board */ - -#include #include #include #include diff --git a/arch/sh/drivers/pci/ops-titan.c b/arch/sh/drivers/pci/ops-titan.c index c6097bcd97fd..cd56d53375e7 100644 --- a/arch/sh/drivers/pci/ops-titan.c +++ b/arch/sh/drivers/pci/ops-titan.c @@ -11,8 +11,6 @@ * * PCI initialization for the Titan boards */ - -#include #include #include #include diff --git a/arch/sh/drivers/pci/pci-sh7780.c b/arch/sh/drivers/pci/pci-sh7780.c index bd3064a82087..d6e635296534 100644 --- a/arch/sh/drivers/pci/pci-sh7780.c +++ b/arch/sh/drivers/pci/pci-sh7780.c @@ -12,10 +12,8 @@ * License. See linux/COPYING for more information. * */ - #undef DEBUG -#include #include #include #include diff --git a/arch/sh/kernel/apm.c b/arch/sh/kernel/apm.c index 871e7d640002..4f66f91b1006 100644 --- a/arch/sh/kernel/apm.c +++ b/arch/sh/kernel/apm.c @@ -16,7 +16,6 @@ * [This document is available from Microsoft at: * http://www.microsoft.com/hwdev/busbios/amp_12.htm] */ -#include #include #include #include diff --git a/arch/sh/math-emu/math.c b/arch/sh/math-emu/math.c index 26b6046814fd..1efbac15ff4e 100644 --- a/arch/sh/math-emu/math.c +++ b/arch/sh/math-emu/math.c @@ -7,7 +7,6 @@ * License. See the file "COPYING" in the main directory of this archive * for more details. */ -#include #include #include #include diff --git a/arch/sh/tools/gen-mach-types b/arch/sh/tools/gen-mach-types index bb2b82234e83..65161e368353 100644 --- a/arch/sh/tools/gen-mach-types +++ b/arch/sh/tools/gen-mach-types @@ -20,8 +20,6 @@ END { printf("#ifndef __ASM_SH_MACHTYPES_H\n"); printf("#define __ASM_SH_MACHTYPES_H\n"); printf("\n"); - printf("#include \n"); - printf("\n"); printf("/*\n"); printf(" * We'll use the following MACH_xxx defs for placeholders for the time\n"); printf(" * being .. these will all go away once sh_machtype is assigned per-board.\n"); diff --git a/include/asm-sh/sfp-machine.h b/include/asm-sh/sfp-machine.h index 8a6399a8cfe0..d3c548443f2a 100644 --- a/include/asm-sh/sfp-machine.h +++ b/include/asm-sh/sfp-machine.h @@ -25,8 +25,6 @@ #ifndef _SFP_MACHINE_H #define _SFP_MACHINE_H -#include - #define _FP_W_TYPE_SIZE 32 #define _FP_W_TYPE unsigned long #define _FP_WS_TYPE signed long -- cgit v1.3-8-gc7d7 From fac99d97469e7f91102f97101bea620e5f073196 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Tue, 3 Oct 2006 14:13:09 +0900 Subject: sh: Fixup __raw_read_trylock(). generic__raw_read_trylock() was broken, fix up the __raw_read_trylock() implementation for something sensible. Taken from m32r, which has the same use cases. Signed-off-by: Paul Mundt --- include/asm-sh/spinlock.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/asm-sh/spinlock.h b/include/asm-sh/spinlock.h index 54458fd24981..2586eef07d57 100644 --- a/include/asm-sh/spinlock.h +++ b/include/asm-sh/spinlock.h @@ -88,7 +88,14 @@ static inline void __raw_write_unlock(raw_rwlock_t *rw) __raw_spin_unlock(&rw->lock); } -#define __raw_read_trylock(lock) generic__raw_read_trylock(lock) +static inline int __raw_read_trylock(raw_rwlock_t *lock) +{ + atomic_t *count = (atomic_t*)lock; + if (atomic_dec_return(count) >= 0) + return 1; + atomic_inc(count); + return 0; +} static inline int __raw_write_trylock(raw_rwlock_t *rw) { -- cgit v1.3-8-gc7d7