summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-h8300/bitops.h132
-rw-r--r--include/asm-i386/mach-es7000/mach_apic.h1
-rw-r--r--include/asm-i386/mach-summit/mach_mpparse.h12
-rw-r--r--include/asm-i386/mpspec.h4
-rw-r--r--include/asm-ppc/highmem.h3
-rw-r--r--include/asm-ppc64/page.h1
-rw-r--r--include/asm-s390/ccwdev.h2
-rw-r--r--include/linux/bio.h2
-rw-r--r--include/linux/hugetlb.h2
-rw-r--r--include/linux/msdos_fs.h46
-rw-r--r--include/linux/msdos_fs_sb.h4
-rw-r--r--include/linux/reiserfs_fs.h2
-rw-r--r--include/media/saa7146.h7
-rw-r--r--include/media/saa7146_vv.h8
14 files changed, 102 insertions, 124 deletions
diff --git a/include/asm-h8300/bitops.h b/include/asm-h8300/bitops.h
index 87068f245d5c..30288d3ffe32 100644
--- a/include/asm-h8300/bitops.h
+++ b/include/asm-h8300/bitops.h
@@ -23,25 +23,22 @@
*/
static __inline__ unsigned long ffz(unsigned long word)
{
- register unsigned long result asm("er0");
- register unsigned long _word asm("er1");
-
- _word = word;
- __asm__("sub.l %0,%0\n\t"
- "dec.l #1,%0\n"
- "1:\n\t"
- "shlr.l %1\n\t"
+ unsigned long result;
+
+ result = -1;
+ __asm__("1:\n\t"
+ "shlr.l %2\n\t"
"adds #1,%0\n\t"
"bcs 1b"
- : "=r" (result) : "r" (_word));
+ : "=r" (result)
+ : "0" (result),"r" (word));
return result;
}
static __inline__ void set_bit(int nr, volatile unsigned long* addr)
{
volatile unsigned char *b_addr;
- b_addr = &(((volatile unsigned char *) addr)
- [((nr >> 3) & ~3) + 3 - ((nr >> 3) & 3)]);
+ b_addr = (volatile unsigned char *)addr + ((nr >> 3) ^ 3);
__asm__("mov.l %1,er0\n\t"
"bset r0l,%0"
:"+m"(*b_addr)
@@ -61,8 +58,7 @@ static __inline__ void set_bit(int nr, volatile unsigned long* addr)
static __inline__ void clear_bit(int nr, volatile unsigned long* addr)
{
volatile unsigned char *b_addr;
- b_addr = &(((volatile unsigned char *) addr)
- [((nr >> 3) & ~3) + 3 - ((nr >> 3) & 3)]);
+ b_addr = (volatile unsigned char *)addr + ((nr >> 3) ^ 3);
__asm__("mov.l %1,er0\n\t"
"bclr r0l,%0"
:"+m"(*b_addr)
@@ -75,8 +71,7 @@ static __inline__ void clear_bit(int nr, volatile unsigned long* addr)
static __inline__ void change_bit(int nr, volatile unsigned long* addr)
{
volatile unsigned char *b_addr;
- b_addr = &(((volatile unsigned char *) addr)
- [((nr >> 3) & ~3) + 3 - ((nr >> 3) & 3)]);
+ b_addr = (volatile unsigned char *)addr + ((nr >> 3) ^ 3);
__asm__("mov.l %1,er0\n\t"
"bnot r0l,%0"
:"+m"(*b_addr)
@@ -88,22 +83,18 @@ static __inline__ void change_bit(int nr, volatile unsigned long* addr)
static __inline__ int test_bit(int nr, const unsigned long* addr)
{
- return ((1UL << (nr & 7)) &
- (((const volatile unsigned char *) addr)
- [((nr >> 3) & ~3) + 3 - ((nr >> 3) & 3)])) != 0;
+ return (*((volatile unsigned char *)addr + ((nr >> 3) ^ 3)) & (1UL << (nr & 7))) != 0;
}
#define __test_bit(nr, addr) test_bit(nr, addr)
static __inline__ int test_and_set_bit(int nr, volatile unsigned long* addr)
{
- register int retval __asm__("er0");
+ int retval = 0;
volatile unsigned char *a;
- a = (volatile unsigned char *)addr;
- a += ((nr >> 3) & ~3) + (3 - ((nr >> 3) & 3));
- __asm__("mov.l %2,er3\n\t"
- "sub.l %0,%0\n\t"
+ a = (volatile unsigned char *)addr += ((nr >> 3) ^ 3); \
+ __asm__("mov.l %4,er3\n\t"
"stc ccr,r3h\n\t"
"orc #0x80,ccr\n\t"
"btst r3l,%1\n\t"
@@ -112,37 +103,35 @@ static __inline__ int test_and_set_bit(int nr, volatile unsigned long* addr)
"inc.l #1,%0\n\t"
"1:"
"ldc r3h,ccr"
- : "=r"(retval),"+m"(*a) :"g"(nr & 7):"er3","memory");
+ : "=r"(retval),"+m"(*a)
+ : "0" (retval),"m" (*a),"g"(nr & 7):"er3","memory");
return retval;
}
static __inline__ int __test_and_set_bit(int nr, volatile unsigned long* addr)
{
- register int retval __asm__("er0");
+ int retval = 0;
volatile unsigned char *a;
- a = (volatile unsigned char *)addr;
- a += ((nr >> 3) & ~3) + (3 - ((nr >> 3) & 3));
- __asm__("mov.l %2,er3\n\t"
- "sub.l %0,%0\n\t"
+ a = (volatile unsigned char *)addr += ((nr >> 3) ^ 3); \
+ __asm__("mov.l %4,er3\n\t"
"btst r3l,%1\n\t"
"bset r3l,%1\n\t"
"beq 1f\n\t"
"inc.l #1,%0\n\t"
"1:"
- : "=r"(retval),"+m"(*a) :"g"(nr & 7):"er3","memory");
+ : "=r"(retval),"+m"(*a)
+ : "0" (retval),"m" (*a),"g"(nr & 7):"er3","memory");
return retval;
}
static __inline__ int test_and_clear_bit(int nr, volatile unsigned long* addr)
{
- register int retval __asm__("er0");
+ int retval = 0;
volatile unsigned char *a;
- a = (volatile unsigned char *)addr;
- a += ((nr >> 3) & ~3) + (3 - ((nr >> 3) & 3));
- __asm__("mov.l %2,er3\n\t"
- "sub.l %0,%0\n\t"
+ a = (volatile unsigned char *)addr += ((nr >> 3) ^ 3); \
+ __asm__("mov.l %4,er3\n\t"
"stc ccr,r3h\n\t"
"orc #0x80,ccr\n\t"
"btst r3l,%1\n\t"
@@ -151,37 +140,35 @@ static __inline__ int test_and_clear_bit(int nr, volatile unsigned long* addr)
"inc.l #1,%0\n\t"
"1:"
"ldc r3h,ccr"
- : "=r"(retval),"=m"(*a) :"g"(nr & 7):"er3","memory");
+ : "=r"(retval),"+m"(*a)
+ : "0" (retval),"m" (*a),"g"(nr & 7):"er3","memory");
return retval;
}
static __inline__ int __test_and_clear_bit(int nr, volatile unsigned long* addr)
{
- register int retval __asm__("er0");
+ int retval = 0;
volatile unsigned char *a;
- a = (volatile unsigned char *)addr;
- a += ((nr >> 3) & ~3) + (3 - ((nr >> 3) & 3));
- __asm__("mov.l %2,er3\n\t"
- "sub.l %0,%0\n\t"
+ a = (volatile unsigned char *)addr += ((nr >> 3) ^ 3); \
+ __asm__("mov.l %4,er3\n\t"
"btst r3l,%1\n\t"
"bclr r3l,%1\n\t"
"beq 1f\n\t"
"inc.l #1,%0\n\t"
"1:"
- : "=r"(retval),"+m"(*a) :"g"(nr & 7):"er3","memory");
+ : "=r"(retval),"+m"(*a)
+ : "0" (retval),"m" (*a),"g"(nr & 7):"er3","memory");
return retval;
}
static __inline__ int test_and_change_bit(int nr, volatile unsigned long* addr)
{
- register int retval __asm__("er0");
+ int retval = 0;
volatile unsigned char *a;
- a = (volatile unsigned char *)addr;
- a += ((nr >> 3) & ~3) + (3 - ((nr >> 3) & 3));
- __asm__("mov.l %2,er3\n\t"
- "sub.l %0,%0\n\t"
+ a = (volatile unsigned char *)addr += ((nr >> 3) ^ 3); \
+ __asm__("mov.l %4,er3\n\t"
"stc ccr,r3h\n\t"
"orc #0x80,ccr\n\t"
"btst r3l,%1\n\t"
@@ -190,25 +177,25 @@ static __inline__ int test_and_change_bit(int nr, volatile unsigned long* addr)
"inc.l #1,%0\n\t"
"1:"
"ldc r3h,ccr"
- : "=r"(retval),"+m"(*a) :"g"(nr & 7):"er3","memory");
+ : "=r"(retval),"+m"(*a)
+ : "0" (retval),"m" (*a),"g"(nr & 7):"er3","memory");
return retval;
}
static __inline__ int __test_and_change_bit(int nr, volatile unsigned long* addr)
{
- register int retval __asm__("er0");
+ int retval = 0;
volatile unsigned char *a;
- a = (volatile unsigned char *)addr;
- a += ((nr >> 3) & ~3) + (3 - ((nr >> 3) & 3));
- __asm__("mov.l %2,er3\n\t"
- "sub.l %0,%0\n\t"
+ a = (volatile unsigned char *)addr += ((nr >> 3) ^ 3); \
+ __asm__("mov.l %4,er3\n\t"
"btst r3l,%1\n\t"
"bnot r3l,%1\n\t"
"beq 1f\n\t"
"inc.l #1,%0\n\t"
"1:"
- : "=r"(retval),"+m"(*a) :"g"(nr & 7):"er3","memory");
+ : "=r"(retval),"+m"(*a)
+ : "0" (retval),"m" (*a),"g"(nr & 7):"er3","memory");
return retval;
}
@@ -251,27 +238,21 @@ found_middle:
return result + ffz(tmp);
}
-static __inline__ unsigned long ffs(unsigned long word)
+static __inline__ unsigned long __ffs(unsigned long word)
{
- register unsigned long result asm("er0");
- register unsigned long _word asm("er1");
-
- _word = word;
- __asm__("sub.l %0,%0\n\t"
- "dec.l #1,%0\n"
- "1:\n\t"
- "shlr.l %1\n\t"
+ unsigned long result;
+
+ result = -1;
+ __asm__("1:\n\t"
+ "shlr.l %2\n\t"
"adds #1,%0\n\t"
"bcc 1b"
- : "=r" (result) : "r"(_word));
+ : "=r" (result)
+ : "0"(result),"r"(word));
return result;
}
-#define __ffs(x) ffs(x)
-
-/*
- * fls: find last bit set.
- */
+#define ffs(x) generic_ffs(x)
#define fls(x) generic_fls(x)
/*
@@ -316,6 +297,7 @@ static __inline__ int ext2_set_bit(int nr, volatile void * addr)
local_irq_restore(flags);
return retval;
}
+#define ext2_set_bit_atomic(lock, nr, addr) ext2_set_bit(nr, addr)
static __inline__ int ext2_clear_bit(int nr, volatile void * addr)
{
@@ -331,6 +313,7 @@ static __inline__ int ext2_clear_bit(int nr, volatile void * addr)
local_irq_restore(flags);
return retval;
}
+#define ext2_clear_bit_atomic(lock, nr, addr) ext2_set_bit(nr, addr)
static __inline__ int ext2_test_bit(int nr, const volatile void * addr)
{
@@ -402,17 +385,6 @@ found_middle:
#define minix_test_bit(nr,addr) test_bit(nr,addr)
#define minix_find_first_zero_bit(addr,size) find_first_zero_bit(addr,size)
-/**
- * hweightN - returns the hamming weight of a N-bit word
- * @x: the word to weigh
- *
- * The Hamming Weight of a number is the total number of bits set in it.
- */
-
-#define hweight32(x) generic_hweight32(x)
-#define hweight16(x) generic_hweight16(x)
-#define hweight8(x) generic_hweight8(x)
-
#endif /* __KERNEL__ */
#endif /* _H8300_BITOPS_H */
diff --git a/include/asm-i386/mach-es7000/mach_apic.h b/include/asm-i386/mach-es7000/mach_apic.h
index b744ac27f6fc..e15b73c7e113 100644
--- a/include/asm-i386/mach-es7000/mach_apic.h
+++ b/include/asm-i386/mach-es7000/mach_apic.h
@@ -39,6 +39,7 @@ static inline cpumask_t target_cpus(void)
#endif
#define APIC_BROADCAST_ID (0xff)
+#define NO_IOAPIC_CHECK (0)
static inline unsigned long check_apicid_used(physid_mask_t bitmap, int apicid)
{
diff --git a/include/asm-i386/mach-summit/mach_mpparse.h b/include/asm-i386/mach-summit/mach_mpparse.h
index 88d215ad7bde..1cce2b924a80 100644
--- a/include/asm-i386/mach-summit/mach_mpparse.h
+++ b/include/asm-i386/mach-summit/mach_mpparse.h
@@ -5,11 +5,11 @@
extern int use_cyclone;
-#ifdef CONFIG_NUMA
+#ifdef CONFIG_X86_SUMMIT_NUMA
extern void setup_summit(void);
-#else /* !CONFIG_NUMA */
+#else
#define setup_summit() {}
-#endif /* CONFIG_NUMA */
+#endif
static inline void mpc_oem_bus_info(struct mpc_config_bus *m, char *name,
struct mpc_config_translation *translation)
@@ -110,9 +110,9 @@ typedef enum {
LookOutBWPEG = 7, /* LookOut WPEG */
} node_type;
-static inline int is_WPEG(node_type type){
- return (type == CompatWPEG || type == AltWPEG ||
- type == LookOutAWPEG || type == LookOutBWPEG);
+static inline int is_WPEG(struct rio_detail *rio){
+ return (rio->type == CompatWPEG || rio->type == AltWPEG ||
+ rio->type == LookOutAWPEG || rio->type == LookOutBWPEG);
}
#endif /* __ASM_MACH_MPPARSE_H */
diff --git a/include/asm-i386/mpspec.h b/include/asm-i386/mpspec.h
index a4ee37cade68..55bd3075d68f 100644
--- a/include/asm-i386/mpspec.h
+++ b/include/asm-i386/mpspec.h
@@ -27,10 +27,6 @@ extern unsigned long mp_lapic_addr;
extern int pic_mode;
extern int using_apic_timer;
-#ifdef CONFIG_X86_SUMMIT
-extern void setup_summit (void);
-#endif
-
#ifdef CONFIG_ACPI_BOOT
extern void mp_register_lapic (u8 id, u8 enabled);
extern void mp_register_lapic_address (u64 address);
diff --git a/include/asm-ppc/highmem.h b/include/asm-ppc/highmem.h
index a4aac1adf9f3..c13b4e495519 100644
--- a/include/asm-ppc/highmem.h
+++ b/include/asm-ppc/highmem.h
@@ -81,6 +81,7 @@ static inline void *kmap_atomic(struct page *page, enum km_type type)
unsigned int idx;
unsigned long vaddr;
+ /* even !CONFIG_PREEMPT needs this, for in_atomic in do_page_fault */
inc_preempt_count();
if (page < highmem_start_page)
return page_address(page);
@@ -105,6 +106,7 @@ static inline void kunmap_atomic(void *kvaddr, enum km_type type)
if (vaddr < KMAP_FIX_BEGIN) { // FIXME
dec_preempt_count();
+ preempt_check_resched();
return;
}
@@ -119,6 +121,7 @@ static inline void kunmap_atomic(void *kvaddr, enum km_type type)
flush_tlb_page(0, vaddr);
#endif
dec_preempt_count();
+ preempt_check_resched();
}
static inline struct page *kmap_atomic_to_page(void *ptr)
diff --git a/include/asm-ppc64/page.h b/include/asm-ppc64/page.h
index 29e5738f7180..5674054309ef 100644
--- a/include/asm-ppc64/page.h
+++ b/include/asm-ppc64/page.h
@@ -41,6 +41,7 @@
( ((addr > (TASK_HPAGE_BASE-len)) && (addr < TASK_HPAGE_END)) || \
((current->mm->context & CONTEXT_LOW_HPAGES) && \
(addr > (TASK_HPAGE_BASE_32-len)) && (addr < TASK_HPAGE_END_32)) )
+#define hugetlb_free_pgtables free_pgtables
#define HAVE_ARCH_HUGETLB_UNMAPPED_AREA
#define in_hugepage_area(context, addr) \
diff --git a/include/asm-s390/ccwdev.h b/include/asm-s390/ccwdev.h
index 25dabfd2a596..f447ac2d193e 100644
--- a/include/asm-s390/ccwdev.h
+++ b/include/asm-s390/ccwdev.h
@@ -69,7 +69,7 @@ ccw_device_id_match(const struct ccw_device_id *array,
/* The struct ccw device is our replacement for the globally accessible
* ioinfo array. ioinfo will mutate into a subchannel device later.
*
- * Reference: Documentation/driver-model.txt */
+ * Reference: Documentation/s390/driver-model.txt */
struct ccw_device {
spinlock_t *ccwlock;
struct ccw_device_private *private; /* cio private information */
diff --git a/include/linux/bio.h b/include/linux/bio.h
index 0ac6a27ea0db..4f090059372e 100644
--- a/include/linux/bio.h
+++ b/include/linux/bio.h
@@ -162,7 +162,7 @@ struct bio {
*/
#define __BVEC_END(bio) bio_iovec_idx((bio), (bio)->bi_vcnt - 1)
-#define __BVEC_START(bio) bio_iovec_idx((bio), 0)
+#define __BVEC_START(bio) bio_iovec_idx((bio), (bio)->bi_idx)
#define BIOVEC_PHYS_MERGEABLE(vec1, vec2) \
((bvec_to_phys((vec1)) + (vec1)->bv_len) == bvec_to_phys((vec2)))
#define BIOVEC_VIRT_MERGEABLE(vec1, vec2) \
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
index b3dd00de8dc3..72bda668895b 100644
--- a/include/linux/hugetlb.h
+++ b/include/linux/hugetlb.h
@@ -39,6 +39,7 @@ mark_mm_hugetlb(struct mm_struct *mm, struct vm_area_struct *vma)
#ifndef ARCH_HAS_HUGEPAGE_ONLY_RANGE
#define is_hugepage_only_range(addr, len) 0
+#define hugetlb_free_pgtables(tlb, prev, start, end) do { } while (0)
#endif
#else /* !CONFIG_HUGETLB_PAGE */
@@ -63,6 +64,7 @@ static inline int is_vm_hugetlb_page(struct vm_area_struct *vma)
#define is_aligned_hugepage_range(addr, len) 0
#define pmd_huge(x) 0
#define is_hugepage_only_range(addr, len) 0
+#define hugetlb_free_pgtables(tlb, prev, start, end) do { } while (0)
#ifndef HPAGE_MASK
#define HPAGE_MASK 0 /* Keep the compiler happy */
diff --git a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h
index b1fb57c91086..f5c6209bc8f1 100644
--- a/include/linux/msdos_fs.h
+++ b/include/linux/msdos_fs.h
@@ -4,13 +4,8 @@
/*
* The MS-DOS filesystem constants/structures
*/
-#include <linux/buffer_head.h>
-#include <linux/string.h>
#include <asm/byteorder.h>
-struct statfs;
-
-
#define SECTOR_SIZE 512 /* sector size (bytes) */
#define SECTOR_BITS 9 /* log2(SECTOR_SIZE) */
#define MSDOS_DPB (MSDOS_DPS) /* dir entries per block */
@@ -18,6 +13,9 @@ struct statfs;
#define MSDOS_DPS (SECTOR_SIZE / sizeof(struct msdos_dir_entry))
#define MSDOS_DPS_BITS 4 /* log2(MSDOS_DPS) */
+
+#define MSDOS_SUPER_MAGIC 0x4d44 /* MD */
+
#define MSDOS_ROOT_INO 1 /* == MINIX_ROOT_INO */
#define MSDOS_DIR_BITS 5 /* log2(sizeof(struct msdos_dir_entry)) */
@@ -25,8 +23,6 @@ struct statfs;
#define FAT_MAX_DIR_ENTRIES (65536)
#define FAT_MAX_DIR_SIZE (FAT_MAX_DIR_ENTRIES << MSDOS_DIR_BITS)
-#define MSDOS_SUPER_MAGIC 0x4d44 /* MD */
-
#define ATTR_NONE 0 /* no attribute bits */
#define ATTR_RO 1 /* read-only */
#define ATTR_HIDDEN 2 /* hidden */
@@ -35,10 +31,10 @@ struct statfs;
#define ATTR_DIR 16 /* directory */
#define ATTR_ARCH 32 /* archived */
+/* attribute bits that are copied "as is" */
#define ATTR_UNUSED (ATTR_VOLUME | ATTR_ARCH | ATTR_SYS | ATTR_HIDDEN)
- /* attribute bits that are copied "as is" */
+/* bits that are used by the Windows 95/Windows NT extended FAT */
#define ATTR_EXT (ATTR_RO | ATTR_HIDDEN | ATTR_SYS | ATTR_VOLUME)
- /* bits that are used by the Windows 95/Windows NT extended FAT */
#define CASE_LOWER_BASE 8 /* base is lower case */
#define CASE_LOWER_EXT 16 /* extension is lower case */
@@ -46,8 +42,12 @@ struct statfs;
#define DELETED_FLAG 0xe5 /* marks file as deleted when in name[0] */
#define IS_FREE(n) (!*(n) || *(n) == DELETED_FLAG)
+/* valid file mode bits */
#define MSDOS_VALID_MODE (S_IFREG | S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO)
- /* valid file mode bits */
+/* Convert attribute bits and a mask to the UNIX mode. */
+#define MSDOS_MKMODE(a, m) (m & (a & ATTR_RO ? S_IRUGO|S_IXUGO : S_IRWXUGO))
+/* Convert the UNIX mode to MS-DOS attribute bits. */
+#define MSDOS_MKATTR(m) ((m & S_IWUGO) ? ATTR_NONE : ATTR_RO)
#define MSDOS_NAME 11 /* maximum name length */
#define MSDOS_LONGNAME 256 /* maximum name length */
@@ -55,24 +55,29 @@ struct statfs;
#define MSDOS_DOT ". " /* ".", padded to MSDOS_NAME chars */
#define MSDOS_DOTDOT ".. " /* "..", padded to MSDOS_NAME chars */
-#define MSDOS_FAT12 4084 /* maximum number of clusters in a 12 bit FAT */
-
/* media of boot sector */
#define FAT_VALID_MEDIA(x) ((0xF8 <= (x) && (x) <= 0xFF) || (x) == 0xF0)
#define FAT_FIRST_ENT(s, x) ((MSDOS_SB(s)->fat_bits == 32 ? 0x0FFFFF00 : \
MSDOS_SB(s)->fat_bits == 16 ? 0xFF00 : 0xF00) | (x))
+/* maximum number of clusters */
+#define MAX_FAT12 0xFF4
+#define MAX_FAT16 0xFFF4
+#define MAX_FAT32 0x0FFFFFF6
+#define MAX_FAT(s) (MSDOS_SB(s)->fat_bits == 32 ? MAX_FAT32 : \
+ MSDOS_SB(s)->fat_bits == 16 ? MAX_FAT16 : MAX_FAT12)
+
/* bad cluster mark */
#define BAD_FAT12 0xFF7
#define BAD_FAT16 0xFFF7
-#define BAD_FAT32 0xFFFFFF7
+#define BAD_FAT32 0x0FFFFFF7
#define BAD_FAT(s) (MSDOS_SB(s)->fat_bits == 32 ? BAD_FAT32 : \
MSDOS_SB(s)->fat_bits == 16 ? BAD_FAT16 : BAD_FAT12)
/* standard EOF */
#define EOF_FAT12 0xFFF
#define EOF_FAT16 0xFFFF
-#define EOF_FAT32 0xFFFFFFF
+#define EOF_FAT32 0x0FFFFFFF
#define EOF_FAT(s) (MSDOS_SB(s)->fat_bits == 32 ? EOF_FAT32 : \
MSDOS_SB(s)->fat_bits == 16 ? EOF_FAT16 : EOF_FAT12)
@@ -80,8 +85,8 @@ struct statfs;
#define FAT_ENT_BAD (BAD_FAT32)
#define FAT_ENT_EOF (EOF_FAT32)
-#define FAT_FSINFO_SIG1 0x41615252
-#define FAT_FSINFO_SIG2 0x61417272
+#define FAT_FSINFO_SIG1 0x41615252
+#define FAT_FSINFO_SIG2 0x61417272
#define IS_FSINFO(x) (CF_LE_L((x)->signature1) == FAT_FSINFO_SIG1 \
&& CF_LE_L((x)->signature2) == FAT_FSINFO_SIG2)
@@ -179,15 +184,10 @@ struct vfat_slot_info {
loff_t i_pos; /* on-disk position of directory entry */
};
-/* Convert attribute bits and a mask to the UNIX mode. */
-#define MSDOS_MKMODE(a,m) (m & (a & ATTR_RO ? S_IRUGO|S_IXUGO : S_IRWXUGO))
-
-/* Convert the UNIX mode to MS-DOS attribute bits. */
-#define MSDOS_MKATTR(m) ((m & S_IWUGO) ? ATTR_NONE : ATTR_RO)
-
-
#ifdef __KERNEL__
+#include <linux/buffer_head.h>
+#include <linux/string.h>
#include <linux/nls.h>
#include <linux/msdos_fs_i.h>
#include <linux/msdos_fs_sb.h>
diff --git a/include/linux/msdos_fs_sb.h b/include/linux/msdos_fs_sb.h
index 546458d82ece..c79a172225d3 100644
--- a/include/linux/msdos_fs_sb.h
+++ b/include/linux/msdos_fs_sb.h
@@ -47,9 +47,9 @@ struct msdos_sb_info {
unsigned long data_start; /* first data sector */
unsigned long clusters; /* number of clusters */
unsigned long root_cluster; /* first cluster of the root directory */
- unsigned long fsinfo_sector; /* FAT32 fsinfo offset from start of disk */
+ unsigned long fsinfo_sector; /* sector number of FAT32 fsinfo */
struct semaphore fat_lock;
- int prev_free; /* previously returned free cluster number */
+ int prev_free; /* previously allocated cluster number */
int free_clusters; /* -1 if undefined */
struct fat_mount_options options;
struct nls_table *nls_disk; /* Codepage used on disk */
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h
index a34e79044978..32fe6c84b3b6 100644
--- a/include/linux/reiserfs_fs.h
+++ b/include/linux/reiserfs_fs.h
@@ -1719,7 +1719,7 @@ void reiserfs_allow_writes(struct super_block *s) ;
void reiserfs_check_lock_depth(char *caller) ;
void reiserfs_prepare_for_journal(struct super_block *, struct buffer_head *bh, int wait) ;
void reiserfs_restore_prepared_buffer(struct super_block *, struct buffer_head *bh) ;
-int journal_init(struct super_block *, const char * j_dev_name, int old_format) ;
+int journal_init(struct super_block *, const char * j_dev_name, int old_format, unsigned int) ;
int journal_release(struct reiserfs_transaction_handle*, struct super_block *) ;
int journal_release_error(struct reiserfs_transaction_handle*, struct super_block *) ;
int journal_end(struct reiserfs_transaction_handle *, struct super_block *, unsigned long) ;
diff --git a/include/media/saa7146.h b/include/media/saa7146.h
index d0d990469705..5e6b16299b05 100644
--- a/include/media/saa7146.h
+++ b/include/media/saa7146.h
@@ -87,6 +87,7 @@ struct saa7146_extension
{
char name[32]; /* name of the device */
#define SAA7146_USE_I2C_IRQ 0x1
+#define SAA7146_I2C_SHORT_DELAY 0x2
int flags;
/* pairs of subvendor and subdevice ids for
@@ -162,9 +163,10 @@ int saa7146_unregister_extension(struct saa7146_extension*);
struct saa7146_format* format_by_fourcc(struct saa7146_dev *dev, int fourcc);
int saa7146_pgtable_alloc(struct pci_dev *pci, struct saa7146_pgtable *pt);
void saa7146_pgtable_free(struct pci_dev *pci, struct saa7146_pgtable *pt);
-void saa7146_pgtable_build_single(struct pci_dev *pci, struct saa7146_pgtable *pt, struct scatterlist *list, int length );
+int saa7146_pgtable_build_single(struct pci_dev *pci, struct saa7146_pgtable *pt, struct scatterlist *list, int length );
char *saa7146_vmalloc_build_pgtable(struct pci_dev *pci, long length, struct saa7146_pgtable *pt);
void saa7146_setgpio(struct saa7146_dev *dev, int port, u32 data);
+int saa7146_wait_for_debi_done(struct saa7146_dev *dev);
/* some memory sizes */
#define SAA7146_I2C_MEM ( 1*PAGE_SIZE)
@@ -187,6 +189,9 @@ void saa7146_setgpio(struct saa7146_dev *dev, int port, u32 data);
#define SAA7146_GPIO_OUTLO 0x40
#define SAA7146_GPIO_OUTHI 0x50
+/* debi defines */
+#define DEBINOSWAP 0x000e0000
+
/* define for the register programming sequencer (rps) */
#define CMD_NOP 0x00000000 /* No operation */
#define CMD_CLR_EVENT 0x00000000 /* Clear event */
diff --git a/include/media/saa7146_vv.h b/include/media/saa7146_vv.h
index f8362431c962..83d8b9d66830 100644
--- a/include/media/saa7146_vv.h
+++ b/include/media/saa7146_vv.h
@@ -149,7 +149,7 @@ struct saa7146_extension_ioctls
};
/* flags */
-#define SAA7146_EXT_SWAP_ODD_EVEN 0x1 /* needs odd/even fields swapped */
+// #define SAA7146_EXT_SWAP_ODD_EVEN 0x1 /* needs odd/even fields swapped */
#define SAA7146_USE_PORT_B_FOR_VBI 0x2 /* use input port b for vbi hardware bug workaround */
struct saa7146_ext_vv
@@ -171,12 +171,10 @@ struct saa7146_ext_vv
struct saa7146_use_ops {
void (*init)(struct saa7146_dev *, struct saa7146_vv *);
- void(*open)(struct saa7146_dev *, struct saa7146_fh *);
- void (*release)(struct saa7146_dev *, struct saa7146_fh *,struct file *);
+ void(*open)(struct saa7146_dev *, struct file *);
+ void (*release)(struct saa7146_dev *, struct file *);
void (*irq_done)(struct saa7146_dev *, unsigned long status);
ssize_t (*read)(struct file *, char *, size_t, loff_t *);
- int (*capture_begin)(struct saa7146_fh *);
- int (*capture_end)(struct saa7146_fh *);
};
/* from saa7146_fops.c */