aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/acpi/actbl.h2
-rw-r--r--include/asm-frv/Kbuild1
-rw-r--r--include/asm-frv/byteorder.h1
-rw-r--r--include/asm-generic/Kbuild.asm1
-rw-r--r--include/asm-generic/bitops/__ffs.h2
-rw-r--r--include/asm-generic/bitops/__fls.h2
-rw-r--r--include/asm-generic/bitops/fls.h2
-rw-r--r--include/asm-generic/bitops/fls64.h4
-rw-r--r--include/asm-generic/pgtable.h4
-rw-r--r--include/asm-generic/rtc.h14
-rw-r--r--include/asm-m32r/Kbuild1
-rw-r--r--include/asm-m32r/byteorder.h2
-rw-r--r--include/asm-mn10300/Kbuild1
-rw-r--r--include/asm-mn10300/byteorder.h1
-rw-r--r--include/drm/drm_crtc.h5
-rw-r--r--include/drm/drm_crtc_helper.h2
-rw-r--r--include/linux/agpgart.h1
-rw-r--r--include/linux/atm_idt77105.h2
-rw-r--r--include/linux/capi.h2
-rw-r--r--include/linux/compat.h13
-rw-r--r--include/linux/connector.h2
-rw-r--r--include/linux/cyclades.h2
-rw-r--r--include/linux/dio.h2
-rw-r--r--include/linux/dmaengine.h21
-rw-r--r--include/linux/fb.h2
-rw-r--r--include/linux/ide.h2
-rw-r--r--include/linux/if_pppol2tp.h2
-rw-r--r--include/linux/if_pppox.h2
-rw-r--r--include/linux/init_task.h6
-rw-r--r--include/linux/input.h2
-rw-r--r--include/linux/ioport.h3
-rw-r--r--include/linux/jbd.h2
-rw-r--r--include/linux/joystick.h2
-rw-r--r--include/linux/kvm.h2
-rw-r--r--include/linux/libata.h11
-rw-r--r--include/linux/loop.h2
-rw-r--r--include/linux/mISDNif.h5
-rw-r--r--include/linux/magic.h2
-rw-r--r--include/linux/matroxfb.h2
-rw-r--r--include/linux/mfd/pcf50633/adc.h72
-rw-r--r--include/linux/mfd/pcf50633/core.h218
-rw-r--r--include/linux/mfd/pcf50633/gpio.h52
-rw-r--r--include/linux/mfd/pcf50633/mbc.h134
-rw-r--r--include/linux/mfd/pcf50633/pmic.h67
-rw-r--r--include/linux/mm.h1
-rw-r--r--include/linux/netdevice.h5
-rw-r--r--include/linux/netfilter/x_tables.h2
-rw-r--r--include/linux/of_i2c.h3
-rw-r--r--include/linux/pci.h5
-rw-r--r--include/linux/pci_ids.h1
-rw-r--r--include/linux/phantom.h2
-rw-r--r--include/linux/radeonfb.h2
-rw-r--r--include/linux/res_counter.h2
-rw-r--r--include/linux/sched.h32
-rw-r--r--include/linux/smp.h13
-rw-r--r--include/linux/swab.h2
-rw-r--r--include/linux/syscalls.h169
-rw-r--r--include/linux/workqueue.h12
-rw-r--r--include/net/wimax.h4
-rw-r--r--include/scsi/libiscsi_tcp.h1
-rw-r--r--include/sound/soc-dapm.h4
-rw-r--r--include/sound/soc.h15
62 files changed, 814 insertions, 141 deletions
diff --git a/include/acpi/actbl.h b/include/acpi/actbl.h
index 813e4b6c2c0d..bf8d4cfd8cf5 100644
--- a/include/acpi/actbl.h
+++ b/include/acpi/actbl.h
@@ -245,7 +245,7 @@ struct acpi_table_fadt {
245#define ACPI_FADT_POWER_BUTTON (1<<4) /* 04: Power button is handled as a generic feature */ 245#define ACPI_FADT_POWER_BUTTON (1<<4) /* 04: Power button is handled as a generic feature */
246#define ACPI_FADT_SLEEP_BUTTON (1<<5) /* 05: Sleep button is handled as a generic feature, or not present */ 246#define ACPI_FADT_SLEEP_BUTTON (1<<5) /* 05: Sleep button is handled as a generic feature, or not present */
247#define ACPI_FADT_FIXED_RTC (1<<6) /* 06: RTC wakeup stat not in fixed register space */ 247#define ACPI_FADT_FIXED_RTC (1<<6) /* 06: RTC wakeup stat not in fixed register space */
248#define ACPI_FADT_S4_RTC_WAKE (1<<7) /* 07: RTC wakeup stat not possible from S4 */ 248#define ACPI_FADT_S4_RTC_WAKE (1<<7) /* 07: RTC wakeup possible from S4 */
249#define ACPI_FADT_32BIT_TIMER (1<<8) /* 08: tmr_val is 32 bits 0=24-bits */ 249#define ACPI_FADT_32BIT_TIMER (1<<8) /* 08: tmr_val is 32 bits 0=24-bits */
250#define ACPI_FADT_DOCKING_SUPPORTED (1<<9) /* 09: Docking supported */ 250#define ACPI_FADT_DOCKING_SUPPORTED (1<<9) /* 09: Docking supported */
251#define ACPI_FADT_RESET_REGISTER (1<<10) /* 10: System reset via the FADT RESET_REG supported */ 251#define ACPI_FADT_RESET_REGISTER (1<<10) /* 10: System reset via the FADT RESET_REG supported */
diff --git a/include/asm-frv/Kbuild b/include/asm-frv/Kbuild
index 1f44e7c76995..0f8956def738 100644
--- a/include/asm-frv/Kbuild
+++ b/include/asm-frv/Kbuild
@@ -3,4 +3,3 @@ include include/asm-generic/Kbuild.asm
3header-y += registers.h 3header-y += registers.h
4 4
5unifdef-y += termios.h 5unifdef-y += termios.h
6unifdef-y += swab.h
diff --git a/include/asm-frv/byteorder.h b/include/asm-frv/byteorder.h
index 1187e51ecd13..f29b7593e088 100644
--- a/include/asm-frv/byteorder.h
+++ b/include/asm-frv/byteorder.h
@@ -1,7 +1,6 @@
1#ifndef _ASM_BYTEORDER_H 1#ifndef _ASM_BYTEORDER_H
2#define _ASM_BYTEORDER_H 2#define _ASM_BYTEORDER_H
3 3
4#include <asm/swab.h>
5#include <linux/byteorder/big_endian.h> 4#include <linux/byteorder/big_endian.h>
6 5
7#endif /* _ASM_BYTEORDER_H */ 6#endif /* _ASM_BYTEORDER_H */
diff --git a/include/asm-generic/Kbuild.asm b/include/asm-generic/Kbuild.asm
index 1870d5e05f1c..70d185534b9d 100644
--- a/include/asm-generic/Kbuild.asm
+++ b/include/asm-generic/Kbuild.asm
@@ -31,6 +31,7 @@ unifdef-y += socket.h
31unifdef-y += sockios.h 31unifdef-y += sockios.h
32unifdef-y += stat.h 32unifdef-y += stat.h
33unifdef-y += statfs.h 33unifdef-y += statfs.h
34unifdef-y += swab.h
34unifdef-y += termbits.h 35unifdef-y += termbits.h
35unifdef-y += termios.h 36unifdef-y += termios.h
36unifdef-y += types.h 37unifdef-y += types.h
diff --git a/include/asm-generic/bitops/__ffs.h b/include/asm-generic/bitops/__ffs.h
index 9a3274aecf83..937d7c435575 100644
--- a/include/asm-generic/bitops/__ffs.h
+++ b/include/asm-generic/bitops/__ffs.h
@@ -9,7 +9,7 @@
9 * 9 *
10 * Undefined if no bit exists, so code should check against 0 first. 10 * Undefined if no bit exists, so code should check against 0 first.
11 */ 11 */
12static inline unsigned long __ffs(unsigned long word) 12static __always_inline unsigned long __ffs(unsigned long word)
13{ 13{
14 int num = 0; 14 int num = 0;
15 15
diff --git a/include/asm-generic/bitops/__fls.h b/include/asm-generic/bitops/__fls.h
index be24465403d6..a60a7ccb6782 100644
--- a/include/asm-generic/bitops/__fls.h
+++ b/include/asm-generic/bitops/__fls.h
@@ -9,7 +9,7 @@
9 * 9 *
10 * Undefined if no set bit exists, so code should check against 0 first. 10 * Undefined if no set bit exists, so code should check against 0 first.
11 */ 11 */
12static inline unsigned long __fls(unsigned long word) 12static __always_inline unsigned long __fls(unsigned long word)
13{ 13{
14 int num = BITS_PER_LONG - 1; 14 int num = BITS_PER_LONG - 1;
15 15
diff --git a/include/asm-generic/bitops/fls.h b/include/asm-generic/bitops/fls.h
index 850859bc5069..0576d1f42f43 100644
--- a/include/asm-generic/bitops/fls.h
+++ b/include/asm-generic/bitops/fls.h
@@ -9,7 +9,7 @@
9 * Note fls(0) = 0, fls(1) = 1, fls(0x80000000) = 32. 9 * Note fls(0) = 0, fls(1) = 1, fls(0x80000000) = 32.
10 */ 10 */
11 11
12static inline int fls(int x) 12static __always_inline int fls(int x)
13{ 13{
14 int r = 32; 14 int r = 32;
15 15
diff --git a/include/asm-generic/bitops/fls64.h b/include/asm-generic/bitops/fls64.h
index 86d403f8b256..b097cf8444e3 100644
--- a/include/asm-generic/bitops/fls64.h
+++ b/include/asm-generic/bitops/fls64.h
@@ -15,7 +15,7 @@
15 * at position 64. 15 * at position 64.
16 */ 16 */
17#if BITS_PER_LONG == 32 17#if BITS_PER_LONG == 32
18static inline int fls64(__u64 x) 18static __always_inline int fls64(__u64 x)
19{ 19{
20 __u32 h = x >> 32; 20 __u32 h = x >> 32;
21 if (h) 21 if (h)
@@ -23,7 +23,7 @@ static inline int fls64(__u64 x)
23 return fls(x); 23 return fls(x);
24} 24}
25#elif BITS_PER_LONG == 64 25#elif BITS_PER_LONG == 64
26static inline int fls64(__u64 x) 26static __always_inline int fls64(__u64 x)
27{ 27{
28 if (x == 0) 28 if (x == 0)
29 return 0; 29 return 0;
diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h
index 72ebe91005a8..8e6d0ca70aba 100644
--- a/include/asm-generic/pgtable.h
+++ b/include/asm-generic/pgtable.h
@@ -301,7 +301,7 @@ static inline void ptep_modify_prot_commit(struct mm_struct *mm,
301 * track_pfn_vma_new is called when a _new_ pfn mapping is being established 301 * track_pfn_vma_new is called when a _new_ pfn mapping is being established
302 * for physical range indicated by pfn and size. 302 * for physical range indicated by pfn and size.
303 */ 303 */
304static inline int track_pfn_vma_new(struct vm_area_struct *vma, pgprot_t prot, 304static inline int track_pfn_vma_new(struct vm_area_struct *vma, pgprot_t *prot,
305 unsigned long pfn, unsigned long size) 305 unsigned long pfn, unsigned long size)
306{ 306{
307 return 0; 307 return 0;
@@ -332,7 +332,7 @@ static inline void untrack_pfn_vma(struct vm_area_struct *vma,
332{ 332{
333} 333}
334#else 334#else
335extern int track_pfn_vma_new(struct vm_area_struct *vma, pgprot_t prot, 335extern int track_pfn_vma_new(struct vm_area_struct *vma, pgprot_t *prot,
336 unsigned long pfn, unsigned long size); 336 unsigned long pfn, unsigned long size);
337extern int track_pfn_vma_copy(struct vm_area_struct *vma); 337extern int track_pfn_vma_copy(struct vm_area_struct *vma);
338extern void untrack_pfn_vma(struct vm_area_struct *vma, unsigned long pfn, 338extern void untrack_pfn_vma(struct vm_area_struct *vma, unsigned long pfn,
diff --git a/include/asm-generic/rtc.h b/include/asm-generic/rtc.h
index 89061c1a67d4..763e3b060f43 100644
--- a/include/asm-generic/rtc.h
+++ b/include/asm-generic/rtc.h
@@ -42,7 +42,7 @@ static inline unsigned char rtc_is_updating(void)
42 return uip; 42 return uip;
43} 43}
44 44
45static inline unsigned int get_rtc_time(struct rtc_time *time) 45static inline unsigned int __get_rtc_time(struct rtc_time *time)
46{ 46{
47 unsigned char ctrl; 47 unsigned char ctrl;
48 unsigned long flags; 48 unsigned long flags;
@@ -108,8 +108,12 @@ static inline unsigned int get_rtc_time(struct rtc_time *time)
108 return RTC_24H; 108 return RTC_24H;
109} 109}
110 110
111#ifndef get_rtc_time
112#define get_rtc_time __get_rtc_time
113#endif
114
111/* Set the current date and time in the real time clock. */ 115/* Set the current date and time in the real time clock. */
112static inline int set_rtc_time(struct rtc_time *time) 116static inline int __set_rtc_time(struct rtc_time *time)
113{ 117{
114 unsigned long flags; 118 unsigned long flags;
115 unsigned char mon, day, hrs, min, sec; 119 unsigned char mon, day, hrs, min, sec;
@@ -190,11 +194,15 @@ static inline int set_rtc_time(struct rtc_time *time)
190 return 0; 194 return 0;
191} 195}
192 196
197#ifndef set_rtc_time
198#define set_rtc_time __set_rtc_time
199#endif
200
193static inline unsigned int get_rtc_ss(void) 201static inline unsigned int get_rtc_ss(void)
194{ 202{
195 struct rtc_time h; 203 struct rtc_time h;
196 204
197 get_rtc_time(&h); 205 __get_rtc_time(&h);
198 return h.tm_sec; 206 return h.tm_sec;
199} 207}
200 208
diff --git a/include/asm-m32r/Kbuild b/include/asm-m32r/Kbuild
index 27b108a86b39..c68e1680da01 100644
--- a/include/asm-m32r/Kbuild
+++ b/include/asm-m32r/Kbuild
@@ -1,2 +1 @@
1include include/asm-generic/Kbuild.asm include include/asm-generic/Kbuild.asm
2unifdef-y += swab.h
diff --git a/include/asm-m32r/byteorder.h b/include/asm-m32r/byteorder.h
index 61ff9cfd8451..21855d8b028b 100644
--- a/include/asm-m32r/byteorder.h
+++ b/include/asm-m32r/byteorder.h
@@ -1,8 +1,6 @@
1#ifndef _ASM_M32R_BYTEORDER_H 1#ifndef _ASM_M32R_BYTEORDER_H
2#define _ASM_M32R_BYTEORDER_H 2#define _ASM_M32R_BYTEORDER_H
3 3
4#include <asm/swab.h>
5
6#if defined(__LITTLE_ENDIAN__) 4#if defined(__LITTLE_ENDIAN__)
7# include <linux/byteorder/little_endian.h> 5# include <linux/byteorder/little_endian.h>
8#else 6#else
diff --git a/include/asm-mn10300/Kbuild b/include/asm-mn10300/Kbuild
index 27b108a86b39..c68e1680da01 100644
--- a/include/asm-mn10300/Kbuild
+++ b/include/asm-mn10300/Kbuild
@@ -1,2 +1 @@
1include include/asm-generic/Kbuild.asm include include/asm-generic/Kbuild.asm
2unifdef-y += swab.h
diff --git a/include/asm-mn10300/byteorder.h b/include/asm-mn10300/byteorder.h
index 45b18ded19e6..5dd0bdd9feee 100644
--- a/include/asm-mn10300/byteorder.h
+++ b/include/asm-mn10300/byteorder.h
@@ -1,7 +1,6 @@
1#ifndef _ASM_BYTEORDER_H 1#ifndef _ASM_BYTEORDER_H
2#define _ASM_BYTEORDER_H 2#define _ASM_BYTEORDER_H
3 3
4#include <asm/swab.h>
5#include <linux/byteorder/little_endian.h> 4#include <linux/byteorder/little_endian.h>
6 5
7#endif /* _ASM_BYTEORDER_H */ 6#endif /* _ASM_BYTEORDER_H */
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
index 0acb07f31fa4..d54de24bf371 100644
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@ -395,7 +395,7 @@ struct drm_connector_funcs {
395 void (*save)(struct drm_connector *connector); 395 void (*save)(struct drm_connector *connector);
396 void (*restore)(struct drm_connector *connector); 396 void (*restore)(struct drm_connector *connector);
397 enum drm_connector_status (*detect)(struct drm_connector *connector); 397 enum drm_connector_status (*detect)(struct drm_connector *connector);
398 void (*fill_modes)(struct drm_connector *connector, uint32_t max_width, uint32_t max_height); 398 int (*fill_modes)(struct drm_connector *connector, uint32_t max_width, uint32_t max_height);
399 int (*set_property)(struct drm_connector *connector, struct drm_property *property, 399 int (*set_property)(struct drm_connector *connector, struct drm_property *property,
400 uint64_t val); 400 uint64_t val);
401 void (*destroy)(struct drm_connector *connector); 401 void (*destroy)(struct drm_connector *connector);
@@ -528,7 +528,8 @@ struct drm_mode_group {
528 * 528 *
529 */ 529 */
530struct drm_mode_config { 530struct drm_mode_config {
531 struct mutex mutex; /* protects configuration and IDR */ 531 struct mutex mutex; /* protects configuration (mode lists etc.) */
532 struct mutex idr_mutex; /* for IDR management */
532 struct idr crtc_idr; /* use this idr for all IDs, fb, crtc, connector, modes - just makes life easier */ 533 struct idr crtc_idr; /* use this idr for all IDs, fb, crtc, connector, modes - just makes life easier */
533 /* this is limited to one for now */ 534 /* this is limited to one for now */
534 int num_fb; 535 int num_fb;
diff --git a/include/drm/drm_crtc_helper.h b/include/drm/drm_crtc_helper.h
index 4bc04cf460a7..0c6f0e11b41b 100644
--- a/include/drm/drm_crtc_helper.h
+++ b/include/drm/drm_crtc_helper.h
@@ -88,7 +88,7 @@ struct drm_connector_helper_funcs {
88 struct drm_encoder *(*best_encoder)(struct drm_connector *connector); 88 struct drm_encoder *(*best_encoder)(struct drm_connector *connector);
89}; 89};
90 90
91extern void drm_helper_probe_single_connector_modes(struct drm_connector *connector, uint32_t maxX, uint32_t maxY); 91extern int drm_helper_probe_single_connector_modes(struct drm_connector *connector, uint32_t maxX, uint32_t maxY);
92extern void drm_helper_disable_unused_functions(struct drm_device *dev); 92extern void drm_helper_disable_unused_functions(struct drm_device *dev);
93extern int drm_helper_hotplug_stage_two(struct drm_device *dev); 93extern int drm_helper_hotplug_stage_two(struct drm_device *dev);
94extern bool drm_helper_initial_config(struct drm_device *dev, bool can_grow); 94extern bool drm_helper_initial_config(struct drm_device *dev, bool can_grow);
diff --git a/include/linux/agpgart.h b/include/linux/agpgart.h
index c8fdb6e658e1..110c600c885f 100644
--- a/include/linux/agpgart.h
+++ b/include/linux/agpgart.h
@@ -52,7 +52,6 @@
52 52
53#ifndef __KERNEL__ 53#ifndef __KERNEL__
54#include <linux/types.h> 54#include <linux/types.h>
55#include <asm/types.h>
56 55
57struct agp_version { 56struct agp_version {
58 __u16 major; 57 __u16 major;
diff --git a/include/linux/atm_idt77105.h b/include/linux/atm_idt77105.h
index 05621cf20709..8b724000aa50 100644
--- a/include/linux/atm_idt77105.h
+++ b/include/linux/atm_idt77105.h
@@ -7,7 +7,7 @@
7#ifndef LINUX_ATM_IDT77105_H 7#ifndef LINUX_ATM_IDT77105_H
8#define LINUX_ATM_IDT77105_H 8#define LINUX_ATM_IDT77105_H
9 9
10#include <asm/types.h> 10#include <linux/types.h>
11#include <linux/atmioc.h> 11#include <linux/atmioc.h>
12#include <linux/atmdev.h> 12#include <linux/atmdev.h>
13 13
diff --git a/include/linux/capi.h b/include/linux/capi.h
index fdebaaa9f66e..65100d6cb89b 100644
--- a/include/linux/capi.h
+++ b/include/linux/capi.h
@@ -12,7 +12,7 @@
12#ifndef __LINUX_CAPI_H__ 12#ifndef __LINUX_CAPI_H__
13#define __LINUX_CAPI_H__ 13#define __LINUX_CAPI_H__
14 14
15#include <asm/types.h> 15#include <linux/types.h>
16#include <linux/ioctl.h> 16#include <linux/ioctl.h>
17#ifndef __KERNEL__ 17#ifndef __KERNEL__
18#include <linux/kernelcapi.h> 18#include <linux/kernelcapi.h>
diff --git a/include/linux/compat.h b/include/linux/compat.h
index e88f3ecf38b4..3fd2194ff573 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -280,5 +280,18 @@ asmlinkage long compat_sys_timerfd_settime(int ufd, int flags,
280asmlinkage long compat_sys_timerfd_gettime(int ufd, 280asmlinkage long compat_sys_timerfd_gettime(int ufd,
281 struct compat_itimerspec __user *otmr); 281 struct compat_itimerspec __user *otmr);
282 282
283asmlinkage long compat_sys_move_pages(pid_t pid, unsigned long nr_page,
284 __u32 __user *pages,
285 const int __user *nodes,
286 int __user *status,
287 int flags);
288asmlinkage long compat_sys_futimesat(unsigned int dfd, char __user *filename,
289 struct compat_timeval __user *t);
290asmlinkage long compat_sys_newfstatat(unsigned int dfd, char __user * filename,
291 struct compat_stat __user *statbuf,
292 int flag);
293asmlinkage long compat_sys_openat(unsigned int dfd, const char __user *filename,
294 int flags, int mode);
295
283#endif /* CONFIG_COMPAT */ 296#endif /* CONFIG_COMPAT */
284#endif /* _LINUX_COMPAT_H */ 297#endif /* _LINUX_COMPAT_H */
diff --git a/include/linux/connector.h b/include/linux/connector.h
index 5c7f9468f753..34f2789d9b9b 100644
--- a/include/linux/connector.h
+++ b/include/linux/connector.h
@@ -22,7 +22,7 @@
22#ifndef __CONNECTOR_H 22#ifndef __CONNECTOR_H
23#define __CONNECTOR_H 23#define __CONNECTOR_H
24 24
25#include <asm/types.h> 25#include <linux/types.h>
26 26
27#define CN_IDX_CONNECTOR 0xffffffff 27#define CN_IDX_CONNECTOR 0xffffffff
28#define CN_VAL_CONNECTOR 0xffffffff 28#define CN_VAL_CONNECTOR 0xffffffff
diff --git a/include/linux/cyclades.h b/include/linux/cyclades.h
index 2d3d1e04ba92..d06fbf286346 100644
--- a/include/linux/cyclades.h
+++ b/include/linux/cyclades.h
@@ -150,8 +150,6 @@ struct CYZ_BOOT_CTRL {
150 * architectures and compilers. 150 * architectures and compilers.
151 */ 151 */
152 152
153#include <asm/types.h>
154
155typedef __u64 ucdouble; /* 64 bits, unsigned */ 153typedef __u64 ucdouble; /* 64 bits, unsigned */
156typedef __u32 uclong; /* 32 bits, unsigned */ 154typedef __u32 uclong; /* 32 bits, unsigned */
157typedef __u16 ucshort; /* 16 bits, unsigned */ 155typedef __u16 ucshort; /* 16 bits, unsigned */
diff --git a/include/linux/dio.h b/include/linux/dio.h
index 1e65ebc2a3db..b2dd31ca1710 100644
--- a/include/linux/dio.h
+++ b/include/linux/dio.h
@@ -241,7 +241,7 @@ struct dio_driver {
241 241
242extern int dio_find(int deviceid); 242extern int dio_find(int deviceid);
243extern unsigned long dio_scodetophysaddr(int scode); 243extern unsigned long dio_scodetophysaddr(int scode);
244extern void dio_create_sysfs_dev_files(struct dio_dev *); 244extern int dio_create_sysfs_dev_files(struct dio_dev *);
245 245
246/* New-style probing */ 246/* New-style probing */
247extern int dio_register_driver(struct dio_driver *); 247extern int dio_register_driver(struct dio_driver *);
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
index 64dea2ab326c..3e0f64c335c8 100644
--- a/include/linux/dmaengine.h
+++ b/include/linux/dmaengine.h
@@ -270,8 +270,18 @@ struct dma_device {
270 270
271/* --- public DMA engine API --- */ 271/* --- public DMA engine API --- */
272 272
273#ifdef CONFIG_DMA_ENGINE
273void dmaengine_get(void); 274void dmaengine_get(void);
274void dmaengine_put(void); 275void dmaengine_put(void);
276#else
277static inline void dmaengine_get(void)
278{
279}
280static inline void dmaengine_put(void)
281{
282}
283#endif
284
275dma_cookie_t dma_async_memcpy_buf_to_buf(struct dma_chan *chan, 285dma_cookie_t dma_async_memcpy_buf_to_buf(struct dma_chan *chan,
276 void *dest, void *src, size_t len); 286 void *dest, void *src, size_t len);
277dma_cookie_t dma_async_memcpy_buf_to_pg(struct dma_chan *chan, 287dma_cookie_t dma_async_memcpy_buf_to_pg(struct dma_chan *chan,
@@ -287,6 +297,11 @@ static inline void async_tx_ack(struct dma_async_tx_descriptor *tx)
287 tx->flags |= DMA_CTRL_ACK; 297 tx->flags |= DMA_CTRL_ACK;
288} 298}
289 299
300static inline void async_tx_clear_ack(struct dma_async_tx_descriptor *tx)
301{
302 tx->flags &= ~DMA_CTRL_ACK;
303}
304
290static inline bool async_tx_test_ack(struct dma_async_tx_descriptor *tx) 305static inline bool async_tx_test_ack(struct dma_async_tx_descriptor *tx)
291{ 306{
292 return (tx->flags & DMA_CTRL_ACK) == DMA_CTRL_ACK; 307 return (tx->flags & DMA_CTRL_ACK) == DMA_CTRL_ACK;
@@ -390,11 +405,16 @@ static inline enum dma_status dma_async_is_complete(dma_cookie_t cookie,
390enum dma_status dma_sync_wait(struct dma_chan *chan, dma_cookie_t cookie); 405enum dma_status dma_sync_wait(struct dma_chan *chan, dma_cookie_t cookie);
391#ifdef CONFIG_DMA_ENGINE 406#ifdef CONFIG_DMA_ENGINE
392enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx); 407enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx);
408void dma_issue_pending_all(void);
393#else 409#else
394static inline enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx) 410static inline enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx)
395{ 411{
396 return DMA_SUCCESS; 412 return DMA_SUCCESS;
397} 413}
414static inline void dma_issue_pending_all(void)
415{
416 do { } while (0);
417}
398#endif 418#endif
399 419
400/* --- DMA device --- */ 420/* --- DMA device --- */
@@ -403,7 +423,6 @@ int dma_async_device_register(struct dma_device *device);
403void dma_async_device_unregister(struct dma_device *device); 423void dma_async_device_unregister(struct dma_device *device);
404void dma_run_dependencies(struct dma_async_tx_descriptor *tx); 424void dma_run_dependencies(struct dma_async_tx_descriptor *tx);
405struct dma_chan *dma_find_channel(enum dma_transaction_type tx_type); 425struct dma_chan *dma_find_channel(enum dma_transaction_type tx_type);
406void dma_issue_pending_all(void);
407#define dma_request_channel(mask, x, y) __dma_request_channel(&(mask), x, y) 426#define dma_request_channel(mask, x, y) __dma_request_channel(&(mask), x, y)
408struct dma_chan *__dma_request_channel(dma_cap_mask_t *mask, dma_filter_fn fn, void *fn_param); 427struct dma_chan *__dma_request_channel(dma_cap_mask_t *mask, dma_filter_fn fn, void *fn_param);
409void dma_release_channel(struct dma_chan *chan); 428void dma_release_channel(struct dma_chan *chan);
diff --git a/include/linux/fb.h b/include/linux/fb.h
index 1ee63df5be92..818fe21257e8 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -1,7 +1,7 @@
1#ifndef _LINUX_FB_H 1#ifndef _LINUX_FB_H
2#define _LINUX_FB_H 2#define _LINUX_FB_H
3 3
4#include <asm/types.h> 4#include <linux/types.h>
5#include <linux/i2c.h> 5#include <linux/i2c.h>
6 6
7struct dentry; 7struct dentry;
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 3644f6323384..194da5a4b0d6 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -871,7 +871,7 @@ struct ide_host {
871 ide_hwif_t *cur_port; /* for hosts requiring serialization */ 871 ide_hwif_t *cur_port; /* for hosts requiring serialization */
872 872
873 /* used for hosts requiring serialization */ 873 /* used for hosts requiring serialization */
874 volatile long host_busy; 874 volatile unsigned long host_busy;
875}; 875};
876 876
877#define IDE_HOST_BUSY 0 877#define IDE_HOST_BUSY 0
diff --git a/include/linux/if_pppol2tp.h b/include/linux/if_pppol2tp.h
index a7d6a2234b31..c7a66882b6d0 100644
--- a/include/linux/if_pppol2tp.h
+++ b/include/linux/if_pppol2tp.h
@@ -15,7 +15,7 @@
15#ifndef __LINUX_IF_PPPOL2TP_H 15#ifndef __LINUX_IF_PPPOL2TP_H
16#define __LINUX_IF_PPPOL2TP_H 16#define __LINUX_IF_PPPOL2TP_H
17 17
18#include <asm/types.h> 18#include <linux/types.h>
19 19
20#ifdef __KERNEL__ 20#ifdef __KERNEL__
21#include <linux/in.h> 21#include <linux/in.h>
diff --git a/include/linux/if_pppox.h b/include/linux/if_pppox.h
index 6fb7f1788570..30c88b2245ff 100644
--- a/include/linux/if_pppox.h
+++ b/include/linux/if_pppox.h
@@ -17,7 +17,7 @@
17#define __LINUX_IF_PPPOX_H 17#define __LINUX_IF_PPPOX_H
18 18
19 19
20#include <asm/types.h> 20#include <linux/types.h>
21#include <asm/byteorder.h> 21#include <asm/byteorder.h>
22 22
23#ifdef __KERNEL__ 23#ifdef __KERNEL__
diff --git a/include/linux/init_task.h b/include/linux/init_task.h
index 2f3c2d4ef73b..ea0ea1a4c36f 100644
--- a/include/linux/init_task.h
+++ b/include/linux/init_task.h
@@ -48,6 +48,12 @@ extern struct fs_struct init_fs;
48 .posix_timers = LIST_HEAD_INIT(sig.posix_timers), \ 48 .posix_timers = LIST_HEAD_INIT(sig.posix_timers), \
49 .cpu_timers = INIT_CPU_TIMERS(sig.cpu_timers), \ 49 .cpu_timers = INIT_CPU_TIMERS(sig.cpu_timers), \
50 .rlim = INIT_RLIMITS, \ 50 .rlim = INIT_RLIMITS, \
51 .cputime = { .totals = { \
52 .utime = cputime_zero, \
53 .stime = cputime_zero, \
54 .sum_exec_runtime = 0, \
55 .lock = __SPIN_LOCK_UNLOCKED(sig.cputime.totals.lock), \
56 }, }, \
51} 57}
52 58
53extern struct nsproxy init_nsproxy; 59extern struct nsproxy init_nsproxy;
diff --git a/include/linux/input.h b/include/linux/input.h
index 9a6355f74db2..1249a0c20a38 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -16,7 +16,7 @@
16#include <sys/time.h> 16#include <sys/time.h>
17#include <sys/ioctl.h> 17#include <sys/ioctl.h>
18#include <sys/types.h> 18#include <sys/types.h>
19#include <asm/types.h> 19#include <linux/types.h>
20#endif 20#endif
21 21
22/* 22/*
diff --git a/include/linux/ioport.h b/include/linux/ioport.h
index f6bb2ca8e3ba..32e4b2f72294 100644
--- a/include/linux/ioport.h
+++ b/include/linux/ioport.h
@@ -143,7 +143,8 @@ static inline unsigned long resource_type(struct resource *res)
143 143
144extern struct resource * __request_region(struct resource *, 144extern struct resource * __request_region(struct resource *,
145 resource_size_t start, 145 resource_size_t start,
146 resource_size_t n, const char *name, int relaxed); 146 resource_size_t n,
147 const char *name, int flags);
147 148
148/* Compatibility cruft */ 149/* Compatibility cruft */
149#define release_region(start,n) __release_region(&ioport_resource, (start), (n)) 150#define release_region(start,n) __release_region(&ioport_resource, (start), (n))
diff --git a/include/linux/jbd.h b/include/linux/jbd.h
index 6384b19efe64..64246dce5663 100644
--- a/include/linux/jbd.h
+++ b/include/linux/jbd.h
@@ -614,6 +614,8 @@ struct transaction_s
614 * @j_wbufsize: maximum number of buffer_heads allowed in j_wbuf, the 614 * @j_wbufsize: maximum number of buffer_heads allowed in j_wbuf, the
615 * number that will fit in j_blocksize 615 * number that will fit in j_blocksize
616 * @j_last_sync_writer: most recent pid which did a synchronous write 616 * @j_last_sync_writer: most recent pid which did a synchronous write
617 * @j_average_commit_time: the average amount of time in nanoseconds it
618 * takes to commit a transaction to the disk.
617 * @j_private: An opaque pointer to fs-private information. 619 * @j_private: An opaque pointer to fs-private information.
618 */ 620 */
619 621
diff --git a/include/linux/joystick.h b/include/linux/joystick.h
index b5e051295a67..9e20c29c1e14 100644
--- a/include/linux/joystick.h
+++ b/include/linux/joystick.h
@@ -27,7 +27,7 @@
27 * Vojtech Pavlik, Ucitelska 1576, Prague 8, 182 00 Czech Republic 27 * Vojtech Pavlik, Ucitelska 1576, Prague 8, 182 00 Czech Republic
28 */ 28 */
29 29
30#include <asm/types.h> 30#include <linux/types.h>
31#include <linux/input.h> 31#include <linux/input.h>
32 32
33/* 33/*
diff --git a/include/linux/kvm.h b/include/linux/kvm.h
index 35525ac63337..5715f1907601 100644
--- a/include/linux/kvm.h
+++ b/include/linux/kvm.h
@@ -7,7 +7,7 @@
7 * Note: you must update KVM_API_VERSION if you change this interface. 7 * Note: you must update KVM_API_VERSION if you change this interface.
8 */ 8 */
9 9
10#include <asm/types.h> 10#include <linux/types.h>
11#include <linux/compiler.h> 11#include <linux/compiler.h>
12#include <linux/ioctl.h> 12#include <linux/ioctl.h>
13#include <asm/kvm.h> 13#include <asm/kvm.h>
diff --git a/include/linux/libata.h b/include/linux/libata.h
index b6b8a7f3ec66..2c6bd66209ff 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -401,12 +401,14 @@ enum {
401 ATA_TIMING_CYC8B, 401 ATA_TIMING_CYC8B,
402 ATA_TIMING_ACTIVE = (1 << 4), 402 ATA_TIMING_ACTIVE = (1 << 4),
403 ATA_TIMING_RECOVER = (1 << 5), 403 ATA_TIMING_RECOVER = (1 << 5),
404 ATA_TIMING_CYCLE = (1 << 6), 404 ATA_TIMING_DMACK_HOLD = (1 << 6),
405 ATA_TIMING_UDMA = (1 << 7), 405 ATA_TIMING_CYCLE = (1 << 7),
406 ATA_TIMING_UDMA = (1 << 8),
406 ATA_TIMING_ALL = ATA_TIMING_SETUP | ATA_TIMING_ACT8B | 407 ATA_TIMING_ALL = ATA_TIMING_SETUP | ATA_TIMING_ACT8B |
407 ATA_TIMING_REC8B | ATA_TIMING_CYC8B | 408 ATA_TIMING_REC8B | ATA_TIMING_CYC8B |
408 ATA_TIMING_ACTIVE | ATA_TIMING_RECOVER | 409 ATA_TIMING_ACTIVE | ATA_TIMING_RECOVER |
409 ATA_TIMING_CYCLE | ATA_TIMING_UDMA, 410 ATA_TIMING_DMACK_HOLD | ATA_TIMING_CYCLE |
411 ATA_TIMING_UDMA,
410}; 412};
411 413
412enum ata_xfer_mask { 414enum ata_xfer_mask {
@@ -866,6 +868,7 @@ struct ata_timing {
866 unsigned short cyc8b; /* t0 for 8-bit I/O */ 868 unsigned short cyc8b; /* t0 for 8-bit I/O */
867 unsigned short active; /* t2 or tD */ 869 unsigned short active; /* t2 or tD */
868 unsigned short recover; /* t2i or tK */ 870 unsigned short recover; /* t2i or tK */
871 unsigned short dmack_hold; /* tj */
869 unsigned short cycle; /* t0 */ 872 unsigned short cycle; /* t0 */
870 unsigned short udma; /* t2CYCTYP/2 */ 873 unsigned short udma; /* t2CYCTYP/2 */
871}; 874};
@@ -927,6 +930,8 @@ extern void ata_host_init(struct ata_host *, struct device *,
927extern int ata_scsi_detect(struct scsi_host_template *sht); 930extern int ata_scsi_detect(struct scsi_host_template *sht);
928extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg); 931extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg);
929extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); 932extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *));
933extern int ata_sas_scsi_ioctl(struct ata_port *ap, struct scsi_device *dev,
934 int cmd, void __user *arg);
930extern void ata_sas_port_destroy(struct ata_port *); 935extern void ata_sas_port_destroy(struct ata_port *);
931extern struct ata_port *ata_sas_port_alloc(struct ata_host *, 936extern struct ata_port *ata_sas_port_alloc(struct ata_host *,
932 struct ata_port_info *, struct Scsi_Host *); 937 struct ata_port_info *, struct Scsi_Host *);
diff --git a/include/linux/loop.h b/include/linux/loop.h
index 46169a7b559b..6ffd6db5bb0d 100644
--- a/include/linux/loop.h
+++ b/include/linux/loop.h
@@ -80,7 +80,7 @@ enum {
80}; 80};
81 81
82#include <asm/posix_types.h> /* for __kernel_old_dev_t */ 82#include <asm/posix_types.h> /* for __kernel_old_dev_t */
83#include <asm/types.h> /* for __u64 */ 83#include <linux/types.h> /* for __u64 */
84 84
85/* Backwards compatibility version */ 85/* Backwards compatibility version */
86struct loop_info { 86struct loop_info {
diff --git a/include/linux/mISDNif.h b/include/linux/mISDNif.h
index 557477ac3d5b..5da3d95b27f1 100644
--- a/include/linux/mISDNif.h
+++ b/include/linux/mISDNif.h
@@ -559,7 +559,10 @@ extern void mISDN_unregister_clock(struct mISDNclock *);
559 559
560static inline struct mISDNdevice *dev_to_mISDN(struct device *dev) 560static inline struct mISDNdevice *dev_to_mISDN(struct device *dev)
561{ 561{
562 return dev_get_drvdata(dev); 562 if (dev)
563 return dev_get_drvdata(dev);
564 else
565 return NULL;
563} 566}
564 567
565extern void set_channel_address(struct mISDNchannel *, u_int, u_int); 568extern void set_channel_address(struct mISDNchannel *, u_int, u_int);
diff --git a/include/linux/magic.h b/include/linux/magic.h
index 439f6f3cb0c4..0b4df7eba852 100644
--- a/include/linux/magic.h
+++ b/include/linux/magic.h
@@ -10,11 +10,13 @@
10#define SYSFS_MAGIC 0x62656572 10#define SYSFS_MAGIC 0x62656572
11#define SECURITYFS_MAGIC 0x73636673 11#define SECURITYFS_MAGIC 0x73636673
12#define TMPFS_MAGIC 0x01021994 12#define TMPFS_MAGIC 0x01021994
13#define SQUASHFS_MAGIC 0x73717368
13#define EFS_SUPER_MAGIC 0x414A53 14#define EFS_SUPER_MAGIC 0x414A53
14#define EXT2_SUPER_MAGIC 0xEF53 15#define EXT2_SUPER_MAGIC 0xEF53
15#define EXT3_SUPER_MAGIC 0xEF53 16#define EXT3_SUPER_MAGIC 0xEF53
16#define XENFS_SUPER_MAGIC 0xabba1974 17#define XENFS_SUPER_MAGIC 0xabba1974
17#define EXT4_SUPER_MAGIC 0xEF53 18#define EXT4_SUPER_MAGIC 0xEF53
19#define BTRFS_SUPER_MAGIC 0x9123683E
18#define HPFS_SUPER_MAGIC 0xf995e849 20#define HPFS_SUPER_MAGIC 0xf995e849
19#define ISOFS_SUPER_MAGIC 0x9660 21#define ISOFS_SUPER_MAGIC 0x9660
20#define JFFS2_SUPER_MAGIC 0x72b6 22#define JFFS2_SUPER_MAGIC 0x72b6
diff --git a/include/linux/matroxfb.h b/include/linux/matroxfb.h
index ae5b09493062..404f678e734b 100644
--- a/include/linux/matroxfb.h
+++ b/include/linux/matroxfb.h
@@ -2,7 +2,7 @@
2#define __LINUX_MATROXFB_H__ 2#define __LINUX_MATROXFB_H__
3 3
4#include <asm/ioctl.h> 4#include <asm/ioctl.h>
5#include <asm/types.h> 5#include <linux/types.h>
6#include <linux/videodev2.h> 6#include <linux/videodev2.h>
7 7
8struct matroxioc_output_mode { 8struct matroxioc_output_mode {
diff --git a/include/linux/mfd/pcf50633/adc.h b/include/linux/mfd/pcf50633/adc.h
new file mode 100644
index 000000000000..56669b4183ad
--- /dev/null
+++ b/include/linux/mfd/pcf50633/adc.h
@@ -0,0 +1,72 @@
1/*
2 * adc.h -- Driver for NXP PCF50633 ADC
3 *
4 * (C) 2006-2008 by Openmoko, Inc.
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
11 */
12
13#ifndef __LINUX_MFD_PCF50633_ADC_H
14#define __LINUX_MFD_PCF50633_ADC_H
15
16#include <linux/mfd/pcf50633/core.h>
17#include <linux/platform_device.h>
18
19/* ADC Registers */
20#define PCF50633_REG_ADCC3 0x52
21#define PCF50633_REG_ADCC2 0x53
22#define PCF50633_REG_ADCC1 0x54
23#define PCF50633_REG_ADCS1 0x55
24#define PCF50633_REG_ADCS2 0x56
25#define PCF50633_REG_ADCS3 0x57
26
27#define PCF50633_ADCC1_ADCSTART 0x01
28#define PCF50633_ADCC1_RES_10BIT 0x02
29#define PCF50633_ADCC1_AVERAGE_NO 0x00
30#define PCF50633_ADCC1_AVERAGE_4 0x04
31#define PCF50633_ADCC1_AVERAGE_8 0x08
32#define PCF50633_ADCC1_AVERAGE_16 0x0c
33#define PCF50633_ADCC1_MUX_BATSNS_RES 0x00
34#define PCF50633_ADCC1_MUX_BATSNS_SUBTR 0x10
35#define PCF50633_ADCC1_MUX_ADCIN2_RES 0x20
36#define PCF50633_ADCC1_MUX_ADCIN2_SUBTR 0x30
37#define PCF50633_ADCC1_MUX_BATTEMP 0x60
38#define PCF50633_ADCC1_MUX_ADCIN1 0x70
39#define PCF50633_ADCC1_AVERAGE_MASK 0x0c
40#define PCF50633_ADCC1_ADCMUX_MASK 0xf0
41
42#define PCF50633_ADCC2_RATIO_NONE 0x00
43#define PCF50633_ADCC2_RATIO_BATTEMP 0x01
44#define PCF50633_ADCC2_RATIO_ADCIN1 0x02
45#define PCF50633_ADCC2_RATIO_BOTH 0x03
46#define PCF50633_ADCC2_RATIOSETTL_100US 0x04
47
48#define PCF50633_ADCC3_ACCSW_EN 0x01
49#define PCF50633_ADCC3_NTCSW_EN 0x04
50#define PCF50633_ADCC3_RES_DIV_TWO 0x10
51#define PCF50633_ADCC3_RES_DIV_THREE 0x00
52
53#define PCF50633_ADCS3_REF_NTCSW 0x00
54#define PCF50633_ADCS3_REF_ACCSW 0x10
55#define PCF50633_ADCS3_REF_2V0 0x20
56#define PCF50633_ADCS3_REF_VISA 0x30
57#define PCF50633_ADCS3_REF_2V0_2 0x70
58#define PCF50633_ADCS3_ADCRDY 0x80
59
60#define PCF50633_ADCS3_ADCDAT1L_MASK 0x03
61#define PCF50633_ADCS3_ADCDAT2L_MASK 0x0c
62#define PCF50633_ADCS3_ADCDAT2L_SHIFT 2
63#define PCF50633_ASCS3_REF_MASK 0x70
64
65extern int
66pcf50633_adc_async_read(struct pcf50633 *pcf, int mux, int avg,
67 void (*callback)(struct pcf50633 *, void *, int),
68 void *callback_param);
69extern int
70pcf50633_adc_sync_read(struct pcf50633 *pcf, int mux, int avg);
71
72#endif /* __LINUX_PCF50633_ADC_H */
diff --git a/include/linux/mfd/pcf50633/core.h b/include/linux/mfd/pcf50633/core.h
new file mode 100644
index 000000000000..4455b212d75a
--- /dev/null
+++ b/include/linux/mfd/pcf50633/core.h
@@ -0,0 +1,218 @@
1/*
2 * core.h -- Core driver for NXP PCF50633
3 *
4 * (C) 2006-2008 by Openmoko, Inc.
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
11 */
12
13#ifndef __LINUX_MFD_PCF50633_CORE_H
14#define __LINUX_MFD_PCF50633_CORE_H
15
16#include <linux/i2c.h>
17#include <linux/workqueue.h>
18#include <linux/regulator/driver.h>
19#include <linux/regulator/machine.h>
20#include <linux/power_supply.h>
21
22struct pcf50633;
23
24#define PCF50633_NUM_REGULATORS 11
25
26struct pcf50633_platform_data {
27 struct regulator_init_data reg_init_data[PCF50633_NUM_REGULATORS];
28
29 char **batteries;
30 int num_batteries;
31
32 /* Callbacks */
33 void (*probe_done)(struct pcf50633 *);
34 void (*mbc_event_callback)(struct pcf50633 *, int);
35 void (*regulator_registered)(struct pcf50633 *, int);
36 void (*force_shutdown)(struct pcf50633 *);
37
38 u8 resumers[5];
39};
40
41struct pcf50633_subdev_pdata {
42 struct pcf50633 *pcf;
43};
44
45struct pcf50633_irq {
46 void (*handler) (int, void *);
47 void *data;
48};
49
50int pcf50633_register_irq(struct pcf50633 *pcf, int irq,
51 void (*handler) (int, void *), void *data);
52int pcf50633_free_irq(struct pcf50633 *pcf, int irq);
53
54int pcf50633_irq_mask(struct pcf50633 *pcf, int irq);
55int pcf50633_irq_unmask(struct pcf50633 *pcf, int irq);
56int pcf50633_irq_mask_get(struct pcf50633 *pcf, int irq);
57
58int pcf50633_read_block(struct pcf50633 *, u8 reg,
59 int nr_regs, u8 *data);
60int pcf50633_write_block(struct pcf50633 *pcf, u8 reg,
61 int nr_regs, u8 *data);
62u8 pcf50633_reg_read(struct pcf50633 *, u8 reg);
63int pcf50633_reg_write(struct pcf50633 *pcf, u8 reg, u8 val);
64
65int pcf50633_reg_set_bit_mask(struct pcf50633 *pcf, u8 reg, u8 mask, u8 val);
66int pcf50633_reg_clear_bits(struct pcf50633 *pcf, u8 reg, u8 bits);
67
68/* Interrupt registers */
69
70#define PCF50633_REG_INT1 0x02
71#define PCF50633_REG_INT2 0x03
72#define PCF50633_REG_INT3 0x04
73#define PCF50633_REG_INT4 0x05
74#define PCF50633_REG_INT5 0x06
75
76#define PCF50633_REG_INT1M 0x07
77#define PCF50633_REG_INT2M 0x08
78#define PCF50633_REG_INT3M 0x09
79#define PCF50633_REG_INT4M 0x0a
80#define PCF50633_REG_INT5M 0x0b
81
82enum {
83 /* Chip IRQs */
84 PCF50633_IRQ_ADPINS,
85 PCF50633_IRQ_ADPREM,
86 PCF50633_IRQ_USBINS,
87 PCF50633_IRQ_USBREM,
88 PCF50633_IRQ_RESERVED1,
89 PCF50633_IRQ_RESERVED2,
90 PCF50633_IRQ_ALARM,
91 PCF50633_IRQ_SECOND,
92 PCF50633_IRQ_ONKEYR,
93 PCF50633_IRQ_ONKEYF,
94 PCF50633_IRQ_EXTON1R,
95 PCF50633_IRQ_EXTON1F,
96 PCF50633_IRQ_EXTON2R,
97 PCF50633_IRQ_EXTON2F,
98 PCF50633_IRQ_EXTON3R,
99 PCF50633_IRQ_EXTON3F,
100 PCF50633_IRQ_BATFULL,
101 PCF50633_IRQ_CHGHALT,
102 PCF50633_IRQ_THLIMON,
103 PCF50633_IRQ_THLIMOFF,
104 PCF50633_IRQ_USBLIMON,
105 PCF50633_IRQ_USBLIMOFF,
106 PCF50633_IRQ_ADCRDY,
107 PCF50633_IRQ_ONKEY1S,
108 PCF50633_IRQ_LOWSYS,
109 PCF50633_IRQ_LOWBAT,
110 PCF50633_IRQ_HIGHTMP,
111 PCF50633_IRQ_AUTOPWRFAIL,
112 PCF50633_IRQ_DWN1PWRFAIL,
113 PCF50633_IRQ_DWN2PWRFAIL,
114 PCF50633_IRQ_LEDPWRFAIL,
115 PCF50633_IRQ_LEDOVP,
116 PCF50633_IRQ_LDO1PWRFAIL,
117 PCF50633_IRQ_LDO2PWRFAIL,
118 PCF50633_IRQ_LDO3PWRFAIL,
119 PCF50633_IRQ_LDO4PWRFAIL,
120 PCF50633_IRQ_LDO5PWRFAIL,
121 PCF50633_IRQ_LDO6PWRFAIL,
122 PCF50633_IRQ_HCLDOPWRFAIL,
123 PCF50633_IRQ_HCLDOOVL,
124
125 /* Always last */
126 PCF50633_NUM_IRQ,
127};
128
129struct pcf50633 {
130 struct device *dev;
131 struct i2c_client *i2c_client;
132
133 struct pcf50633_platform_data *pdata;
134 int irq;
135 struct pcf50633_irq irq_handler[PCF50633_NUM_IRQ];
136 struct work_struct irq_work;
137 struct mutex lock;
138
139 u8 mask_regs[5];
140
141 u8 suspend_irq_masks[5];
142 u8 resume_reason[5];
143 int is_suspended;
144
145 int onkey1s_held;
146
147 struct platform_device *rtc_pdev;
148 struct platform_device *mbc_pdev;
149 struct platform_device *adc_pdev;
150 struct platform_device *input_pdev;
151 struct platform_device *regulator_pdev[PCF50633_NUM_REGULATORS];
152};
153
154enum pcf50633_reg_int1 {
155 PCF50633_INT1_ADPINS = 0x01, /* Adapter inserted */
156 PCF50633_INT1_ADPREM = 0x02, /* Adapter removed */
157 PCF50633_INT1_USBINS = 0x04, /* USB inserted */
158 PCF50633_INT1_USBREM = 0x08, /* USB removed */
159 /* reserved */
160 PCF50633_INT1_ALARM = 0x40, /* RTC alarm time is reached */
161 PCF50633_INT1_SECOND = 0x80, /* RTC periodic second interrupt */
162};
163
164enum pcf50633_reg_int2 {
165 PCF50633_INT2_ONKEYR = 0x01, /* ONKEY rising edge */
166 PCF50633_INT2_ONKEYF = 0x02, /* ONKEY falling edge */
167 PCF50633_INT2_EXTON1R = 0x04, /* EXTON1 rising edge */
168 PCF50633_INT2_EXTON1F = 0x08, /* EXTON1 falling edge */
169 PCF50633_INT2_EXTON2R = 0x10, /* EXTON2 rising edge */
170 PCF50633_INT2_EXTON2F = 0x20, /* EXTON2 falling edge */
171 PCF50633_INT2_EXTON3R = 0x40, /* EXTON3 rising edge */
172 PCF50633_INT2_EXTON3F = 0x80, /* EXTON3 falling edge */
173};
174
175enum pcf50633_reg_int3 {
176 PCF50633_INT3_BATFULL = 0x01, /* Battery full */
177 PCF50633_INT3_CHGHALT = 0x02, /* Charger halt */
178 PCF50633_INT3_THLIMON = 0x04,
179 PCF50633_INT3_THLIMOFF = 0x08,
180 PCF50633_INT3_USBLIMON = 0x10,
181 PCF50633_INT3_USBLIMOFF = 0x20,
182 PCF50633_INT3_ADCRDY = 0x40, /* ADC result ready */
183 PCF50633_INT3_ONKEY1S = 0x80, /* ONKEY pressed 1 second */
184};
185
186enum pcf50633_reg_int4 {
187 PCF50633_INT4_LOWSYS = 0x01,
188 PCF50633_INT4_LOWBAT = 0x02,
189 PCF50633_INT4_HIGHTMP = 0x04,
190 PCF50633_INT4_AUTOPWRFAIL = 0x08,
191 PCF50633_INT4_DWN1PWRFAIL = 0x10,
192 PCF50633_INT4_DWN2PWRFAIL = 0x20,
193 PCF50633_INT4_LEDPWRFAIL = 0x40,
194 PCF50633_INT4_LEDOVP = 0x80,
195};
196
197enum pcf50633_reg_int5 {
198 PCF50633_INT5_LDO1PWRFAIL = 0x01,
199 PCF50633_INT5_LDO2PWRFAIL = 0x02,
200 PCF50633_INT5_LDO3PWRFAIL = 0x04,
201 PCF50633_INT5_LDO4PWRFAIL = 0x08,
202 PCF50633_INT5_LDO5PWRFAIL = 0x10,
203 PCF50633_INT5_LDO6PWRFAIL = 0x20,
204 PCF50633_INT5_HCLDOPWRFAIL = 0x40,
205 PCF50633_INT5_HCLDOOVL = 0x80,
206};
207
208/* misc. registers */
209#define PCF50633_REG_OOCSHDWN 0x0c
210
211/* LED registers */
212#define PCF50633_REG_LEDOUT 0x28
213#define PCF50633_REG_LEDENA 0x29
214#define PCF50633_REG_LEDCTL 0x2a
215#define PCF50633_REG_LEDDIM 0x2b
216
217#endif
218
diff --git a/include/linux/mfd/pcf50633/gpio.h b/include/linux/mfd/pcf50633/gpio.h
new file mode 100644
index 000000000000..a42b845efc54
--- /dev/null
+++ b/include/linux/mfd/pcf50633/gpio.h
@@ -0,0 +1,52 @@
1/*
2 * gpio.h -- GPIO driver for NXP PCF50633
3 *
4 * (C) 2006-2008 by Openmoko, Inc.
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
11 */
12
13#ifndef __LINUX_MFD_PCF50633_GPIO_H
14#define __LINUX_MFD_PCF50633_GPIO_H
15
16#include <linux/mfd/pcf50633/core.h>
17
18#define PCF50633_GPIO1 1
19#define PCF50633_GPIO2 2
20#define PCF50633_GPIO3 3
21#define PCF50633_GPO 4
22
23#define PCF50633_REG_GPIO1CFG 0x14
24#define PCF50633_REG_GPIO2CFG 0x15
25#define PCF50633_REG_GPIO3CFG 0x16
26#define PCF50633_REG_GPOCFG 0x17
27
28#define PCF50633_GPOCFG_GPOSEL_MASK 0x07
29
30enum pcf50633_reg_gpocfg {
31 PCF50633_GPOCFG_GPOSEL_0 = 0x00,
32 PCF50633_GPOCFG_GPOSEL_LED_NFET = 0x01,
33 PCF50633_GPOCFG_GPOSEL_SYSxOK = 0x02,
34 PCF50633_GPOCFG_GPOSEL_CLK32K = 0x03,
35 PCF50633_GPOCFG_GPOSEL_ADAPUSB = 0x04,
36 PCF50633_GPOCFG_GPOSEL_USBxOK = 0x05,
37 PCF50633_GPOCFG_GPOSEL_ACTPH4 = 0x06,
38 PCF50633_GPOCFG_GPOSEL_1 = 0x07,
39 PCF50633_GPOCFG_GPOSEL_INVERSE = 0x08,
40};
41
42int pcf50633_gpio_set(struct pcf50633 *pcf, int gpio, u8 val);
43u8 pcf50633_gpio_get(struct pcf50633 *pcf, int gpio);
44
45int pcf50633_gpio_invert_set(struct pcf50633 *, int gpio, int invert);
46int pcf50633_gpio_invert_get(struct pcf50633 *pcf, int gpio);
47
48int pcf50633_gpio_power_supply_set(struct pcf50633 *,
49 int gpio, int regulator, int on);
50#endif /* __LINUX_MFD_PCF50633_GPIO_H */
51
52
diff --git a/include/linux/mfd/pcf50633/mbc.h b/include/linux/mfd/pcf50633/mbc.h
new file mode 100644
index 000000000000..6e17619b773a
--- /dev/null
+++ b/include/linux/mfd/pcf50633/mbc.h
@@ -0,0 +1,134 @@
1/*
2 * mbc.h -- Driver for NXP PCF50633 Main Battery Charger
3 *
4 * (C) 2006-2008 by Openmoko, Inc.
5 * All rights reserved.
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2 of the License, or (at your
10 * option) any later version.
11 */
12
13#ifndef __LINUX_MFD_PCF50633_MBC_H
14#define __LINUX_MFD_PCF50633_MBC_H
15
16#include <linux/mfd/pcf50633/core.h>
17#include <linux/platform_device.h>
18
19#define PCF50633_REG_MBCC1 0x43
20#define PCF50633_REG_MBCC2 0x44
21#define PCF50633_REG_MBCC3 0x45
22#define PCF50633_REG_MBCC4 0x46
23#define PCF50633_REG_MBCC5 0x47
24#define PCF50633_REG_MBCC6 0x48
25#define PCF50633_REG_MBCC7 0x49
26#define PCF50633_REG_MBCC8 0x4a
27#define PCF50633_REG_MBCS1 0x4b
28#define PCF50633_REG_MBCS2 0x4c
29#define PCF50633_REG_MBCS3 0x4d
30
31enum pcf50633_reg_mbcc1 {
32 PCF50633_MBCC1_CHGENA = 0x01, /* Charger enable */
33 PCF50633_MBCC1_AUTOSTOP = 0x02,
34 PCF50633_MBCC1_AUTORES = 0x04, /* automatic resume */
35 PCF50633_MBCC1_RESUME = 0x08, /* explicit resume cmd */
36 PCF50633_MBCC1_RESTART = 0x10, /* restart charging */
37 PCF50633_MBCC1_PREWDTIME_60M = 0x20, /* max. precharging time */
38 PCF50633_MBCC1_WDTIME_1H = 0x00,
39 PCF50633_MBCC1_WDTIME_2H = 0x40,
40 PCF50633_MBCC1_WDTIME_4H = 0x80,
41 PCF50633_MBCC1_WDTIME_6H = 0xc0,
42};
43#define PCF50633_MBCC1_WDTIME_MASK 0xc0
44
45enum pcf50633_reg_mbcc2 {
46 PCF50633_MBCC2_VBATCOND_2V7 = 0x00,
47 PCF50633_MBCC2_VBATCOND_2V85 = 0x01,
48 PCF50633_MBCC2_VBATCOND_3V0 = 0x02,
49 PCF50633_MBCC2_VBATCOND_3V15 = 0x03,
50 PCF50633_MBCC2_VMAX_4V = 0x00,
51 PCF50633_MBCC2_VMAX_4V20 = 0x28,
52 PCF50633_MBCC2_VRESDEBTIME_64S = 0x80, /* debounce time (32/64sec) */
53};
54
55enum pcf50633_reg_mbcc7 {
56 PCF50633_MBCC7_USB_100mA = 0x00,
57 PCF50633_MBCC7_USB_500mA = 0x01,
58 PCF50633_MBCC7_USB_1000mA = 0x02,
59 PCF50633_MBCC7_USB_SUSPEND = 0x03,
60 PCF50633_MBCC7_BATTEMP_EN = 0x04,
61 PCF50633_MBCC7_BATSYSIMAX_1A6 = 0x00,
62 PCF50633_MBCC7_BATSYSIMAX_1A8 = 0x40,
63 PCF50633_MBCC7_BATSYSIMAX_2A0 = 0x80,
64 PCF50633_MBCC7_BATSYSIMAX_2A2 = 0xc0,
65};
66#define PCF50633_MBCC7_USB_MASK 0x03
67
68enum pcf50633_reg_mbcc8 {
69 PCF50633_MBCC8_USBENASUS = 0x10,
70};
71
72enum pcf50633_reg_mbcs1 {
73 PCF50633_MBCS1_USBPRES = 0x01,
74 PCF50633_MBCS1_USBOK = 0x02,
75 PCF50633_MBCS1_ADAPTPRES = 0x04,
76 PCF50633_MBCS1_ADAPTOK = 0x08,
77 PCF50633_MBCS1_TBAT_OK = 0x00,
78 PCF50633_MBCS1_TBAT_ABOVE = 0x10,
79 PCF50633_MBCS1_TBAT_BELOW = 0x20,
80 PCF50633_MBCS1_TBAT_UNDEF = 0x30,
81 PCF50633_MBCS1_PREWDTEXP = 0x40,
82 PCF50633_MBCS1_WDTEXP = 0x80,
83};
84
85enum pcf50633_reg_mbcs2_mbcmod {
86 PCF50633_MBCS2_MBC_PLAY = 0x00,
87 PCF50633_MBCS2_MBC_USB_PRE = 0x01,
88 PCF50633_MBCS2_MBC_USB_PRE_WAIT = 0x02,
89 PCF50633_MBCS2_MBC_USB_FAST = 0x03,
90 PCF50633_MBCS2_MBC_USB_FAST_WAIT = 0x04,
91 PCF50633_MBCS2_MBC_USB_SUSPEND = 0x05,
92 PCF50633_MBCS2_MBC_ADP_PRE = 0x06,
93 PCF50633_MBCS2_MBC_ADP_PRE_WAIT = 0x07,
94 PCF50633_MBCS2_MBC_ADP_FAST = 0x08,
95 PCF50633_MBCS2_MBC_ADP_FAST_WAIT = 0x09,
96 PCF50633_MBCS2_MBC_BAT_FULL = 0x0a,
97 PCF50633_MBCS2_MBC_HALT = 0x0b,
98};
99#define PCF50633_MBCS2_MBC_MASK 0x0f
100enum pcf50633_reg_mbcs2_chgstat {
101 PCF50633_MBCS2_CHGS_NONE = 0x00,
102 PCF50633_MBCS2_CHGS_ADAPTER = 0x10,
103 PCF50633_MBCS2_CHGS_USB = 0x20,
104 PCF50633_MBCS2_CHGS_BOTH = 0x30,
105};
106#define PCF50633_MBCS2_RESSTAT_AUTO 0x40
107
108enum pcf50633_reg_mbcs3 {
109 PCF50633_MBCS3_USBLIM_PLAY = 0x01,
110 PCF50633_MBCS3_USBLIM_CGH = 0x02,
111 PCF50633_MBCS3_TLIM_PLAY = 0x04,
112 PCF50633_MBCS3_TLIM_CHG = 0x08,
113 PCF50633_MBCS3_ILIM = 0x10, /* 1: Ibat > Icutoff */
114 PCF50633_MBCS3_VLIM = 0x20, /* 1: Vbat == Vmax */
115 PCF50633_MBCS3_VBATSTAT = 0x40, /* 1: Vbat > Vbatcond */
116 PCF50633_MBCS3_VRES = 0x80, /* 1: Vbat > Vth(RES) */
117};
118
119#define PCF50633_MBCC2_VBATCOND_MASK 0x03
120#define PCF50633_MBCC2_VMAX_MASK 0x3c
121
122/* Charger status */
123#define PCF50633_MBC_USB_ONLINE 0x01
124#define PCF50633_MBC_USB_ACTIVE 0x02
125#define PCF50633_MBC_ADAPTER_ONLINE 0x04
126#define PCF50633_MBC_ADAPTER_ACTIVE 0x08
127
128int pcf50633_mbc_usb_curlim_set(struct pcf50633 *pcf, int ma);
129
130int pcf50633_mbc_get_status(struct pcf50633 *);
131void pcf50633_mbc_set_status(struct pcf50633 *, int what, int status);
132
133#endif
134
diff --git a/include/linux/mfd/pcf50633/pmic.h b/include/linux/mfd/pcf50633/pmic.h
new file mode 100644
index 000000000000..2d3dbe53b235
--- /dev/null
+++ b/include/linux/mfd/pcf50633/pmic.h
@@ -0,0 +1,67 @@
1#ifndef __LINUX_MFD_PCF50633_PMIC_H
2#define __LINUX_MFD_PCF50633_PMIC_H
3
4#include <linux/mfd/pcf50633/core.h>
5#include <linux/platform_device.h>
6
7#define PCF50633_REG_AUTOOUT 0x1a
8#define PCF50633_REG_AUTOENA 0x1b
9#define PCF50633_REG_AUTOCTL 0x1c
10#define PCF50633_REG_AUTOMXC 0x1d
11#define PCF50633_REG_DOWN1OUT 0x1e
12#define PCF50633_REG_DOWN1ENA 0x1f
13#define PCF50633_REG_DOWN1CTL 0x20
14#define PCF50633_REG_DOWN1MXC 0x21
15#define PCF50633_REG_DOWN2OUT 0x22
16#define PCF50633_REG_DOWN2ENA 0x23
17#define PCF50633_REG_DOWN2CTL 0x24
18#define PCF50633_REG_DOWN2MXC 0x25
19#define PCF50633_REG_MEMLDOOUT 0x26
20#define PCF50633_REG_MEMLDOENA 0x27
21#define PCF50633_REG_LDO1OUT 0x2d
22#define PCF50633_REG_LDO1ENA 0x2e
23#define PCF50633_REG_LDO2OUT 0x2f
24#define PCF50633_REG_LDO2ENA 0x30
25#define PCF50633_REG_LDO3OUT 0x31
26#define PCF50633_REG_LDO3ENA 0x32
27#define PCF50633_REG_LDO4OUT 0x33
28#define PCF50633_REG_LDO4ENA 0x34
29#define PCF50633_REG_LDO5OUT 0x35
30#define PCF50633_REG_LDO5ENA 0x36
31#define PCF50633_REG_LDO6OUT 0x37
32#define PCF50633_REG_LDO6ENA 0x38
33#define PCF50633_REG_HCLDOOUT 0x39
34#define PCF50633_REG_HCLDOENA 0x3a
35#define PCF50633_REG_HCLDOOVL 0x40
36
37enum pcf50633_regulator_enable {
38 PCF50633_REGULATOR_ON = 0x01,
39 PCF50633_REGULATOR_ON_GPIO1 = 0x02,
40 PCF50633_REGULATOR_ON_GPIO2 = 0x04,
41 PCF50633_REGULATOR_ON_GPIO3 = 0x08,
42};
43#define PCF50633_REGULATOR_ON_MASK 0x0f
44
45enum pcf50633_regulator_phase {
46 PCF50633_REGULATOR_ACTPH1 = 0x00,
47 PCF50633_REGULATOR_ACTPH2 = 0x10,
48 PCF50633_REGULATOR_ACTPH3 = 0x20,
49 PCF50633_REGULATOR_ACTPH4 = 0x30,
50};
51#define PCF50633_REGULATOR_ACTPH_MASK 0x30
52
53enum pcf50633_regulator_id {
54 PCF50633_REGULATOR_AUTO,
55 PCF50633_REGULATOR_DOWN1,
56 PCF50633_REGULATOR_DOWN2,
57 PCF50633_REGULATOR_LDO1,
58 PCF50633_REGULATOR_LDO2,
59 PCF50633_REGULATOR_LDO3,
60 PCF50633_REGULATOR_LDO4,
61 PCF50633_REGULATOR_LDO5,
62 PCF50633_REGULATOR_LDO6,
63 PCF50633_REGULATOR_HCLDO,
64 PCF50633_REGULATOR_MEMLDO,
65};
66#endif
67
diff --git a/include/linux/mm.h b/include/linux/mm.h
index b91a73fd1bcc..e8ddc98b8405 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -260,7 +260,6 @@ static inline int put_page_testzero(struct page *page)
260 */ 260 */
261static inline int get_page_unless_zero(struct page *page) 261static inline int get_page_unless_zero(struct page *page)
262{ 262{
263 VM_BUG_ON(PageTail(page));
264 return atomic_inc_not_zero(&page->_count); 263 return atomic_inc_not_zero(&page->_count);
265} 264}
266 265
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index f24556813375..ec54785d34f9 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -467,7 +467,7 @@ struct netdev_queue {
467 * This function is called when network device transistions to the down 467 * This function is called when network device transistions to the down
468 * state. 468 * state.
469 * 469 *
470 * int (*ndo_hard_start_xmit)(struct sk_buff *skb, struct net_device *dev); 470 * int (*ndo_start_xmit)(struct sk_buff *skb, struct net_device *dev);
471 * Called when a packet needs to be transmitted. 471 * Called when a packet needs to be transmitted.
472 * Must return NETDEV_TX_OK , NETDEV_TX_BUSY, or NETDEV_TX_LOCKED, 472 * Must return NETDEV_TX_OK , NETDEV_TX_BUSY, or NETDEV_TX_LOCKED,
473 * Required can not be NULL. 473 * Required can not be NULL.
@@ -795,6 +795,7 @@ struct net_device
795 NETREG_UNREGISTERING, /* called unregister_netdevice */ 795 NETREG_UNREGISTERING, /* called unregister_netdevice */
796 NETREG_UNREGISTERED, /* completed unregister todo */ 796 NETREG_UNREGISTERED, /* completed unregister todo */
797 NETREG_RELEASED, /* called free_netdev */ 797 NETREG_RELEASED, /* called free_netdev */
798 NETREG_DUMMY, /* dummy device for NAPI poll */
798 } reg_state; 799 } reg_state;
799 800
800 /* Called from unregister, can be used to call free_netdev */ 801 /* Called from unregister, can be used to call free_netdev */
@@ -1077,6 +1078,8 @@ extern void free_netdev(struct net_device *dev);
1077extern void synchronize_net(void); 1078extern void synchronize_net(void);
1078extern int register_netdevice_notifier(struct notifier_block *nb); 1079extern int register_netdevice_notifier(struct notifier_block *nb);
1079extern int unregister_netdevice_notifier(struct notifier_block *nb); 1080extern int unregister_netdevice_notifier(struct notifier_block *nb);
1081extern int init_dummy_netdev(struct net_device *dev);
1082
1080extern int call_netdevice_notifiers(unsigned long val, struct net_device *dev); 1083extern int call_netdevice_notifiers(unsigned long val, struct net_device *dev);
1081extern struct net_device *dev_get_by_index(struct net *net, int ifindex); 1084extern struct net_device *dev_get_by_index(struct net *net, int ifindex);
1082extern struct net_device *__dev_get_by_index(struct net *net, int ifindex); 1085extern struct net_device *__dev_get_by_index(struct net *net, int ifindex);
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h
index e52ce475d19f..c7ee8744d26b 100644
--- a/include/linux/netfilter/x_tables.h
+++ b/include/linux/netfilter/x_tables.h
@@ -270,6 +270,7 @@ struct xt_match
270 struct list_head list; 270 struct list_head list;
271 271
272 const char name[XT_FUNCTION_MAXNAMELEN-1]; 272 const char name[XT_FUNCTION_MAXNAMELEN-1];
273 u_int8_t revision;
273 274
274 /* Return true or false: return FALSE and set *hotdrop = 1 to 275 /* Return true or false: return FALSE and set *hotdrop = 1 to
275 force immediate packet drop. */ 276 force immediate packet drop. */
@@ -302,7 +303,6 @@ struct xt_match
302 unsigned short proto; 303 unsigned short proto;
303 304
304 unsigned short family; 305 unsigned short family;
305 u_int8_t revision;
306}; 306};
307 307
308/* Registration hooks for targets. */ 308/* Registration hooks for targets. */
diff --git a/include/linux/of_i2c.h b/include/linux/of_i2c.h
index bd2a870ec296..34974b5a76f7 100644
--- a/include/linux/of_i2c.h
+++ b/include/linux/of_i2c.h
@@ -17,4 +17,7 @@
17void of_register_i2c_devices(struct i2c_adapter *adap, 17void of_register_i2c_devices(struct i2c_adapter *adap,
18 struct device_node *adap_node); 18 struct device_node *adap_node);
19 19
20/* must call put_device() when done with returned i2c_client device */
21struct i2c_client *of_find_i2c_device_by_node(struct device_node *node);
22
20#endif /* __LINUX_OF_I2C_H */ 23#endif /* __LINUX_OF_I2C_H */
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 80f8b8b65fde..48890cf3f96e 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -117,6 +117,10 @@ typedef int __bitwise pci_power_t;
117#define PCI_UNKNOWN ((pci_power_t __force) 5) 117#define PCI_UNKNOWN ((pci_power_t __force) 5)
118#define PCI_POWER_ERROR ((pci_power_t __force) -1) 118#define PCI_POWER_ERROR ((pci_power_t __force) -1)
119 119
120#define PCI_PM_D2_DELAY 200
121#define PCI_PM_D3_WAIT 10
122#define PCI_PM_BUS_WAIT 50
123
120/** The pci_channel state describes connectivity between the CPU and 124/** The pci_channel state describes connectivity between the CPU and
121 * the pci device. If some PCI bus between here and the pci device 125 * the pci device. If some PCI bus between here and the pci device
122 * has crashed or locked up, this info is reflected here. 126 * has crashed or locked up, this info is reflected here.
@@ -252,6 +256,7 @@ struct pci_dev {
252 unsigned int ari_enabled:1; /* ARI forwarding */ 256 unsigned int ari_enabled:1; /* ARI forwarding */
253 unsigned int is_managed:1; 257 unsigned int is_managed:1;
254 unsigned int is_pcie:1; 258 unsigned int is_pcie:1;
259 unsigned int state_saved:1;
255 pci_dev_flags_t dev_flags; 260 pci_dev_flags_t dev_flags;
256 atomic_t enable_cnt; /* pci_enable_device has been called */ 261 atomic_t enable_cnt; /* pci_enable_device has been called */
257 262
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index d543365518ab..d56ad9c21c09 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -2174,6 +2174,7 @@
2174#define PCI_DEVICE_ID_RDC_R6040 0x6040 2174#define PCI_DEVICE_ID_RDC_R6040 0x6040
2175#define PCI_DEVICE_ID_RDC_R6060 0x6060 2175#define PCI_DEVICE_ID_RDC_R6060 0x6060
2176#define PCI_DEVICE_ID_RDC_R6061 0x6061 2176#define PCI_DEVICE_ID_RDC_R6061 0x6061
2177#define PCI_DEVICE_ID_RDC_D1010 0x1010
2177 2178
2178#define PCI_VENDOR_ID_LENOVO 0x17aa 2179#define PCI_VENDOR_ID_LENOVO 0x17aa
2179 2180
diff --git a/include/linux/phantom.h b/include/linux/phantom.h
index 02268c54c250..94dd6645c60a 100644
--- a/include/linux/phantom.h
+++ b/include/linux/phantom.h
@@ -10,7 +10,7 @@
10#ifndef __PHANTOM_H 10#ifndef __PHANTOM_H
11#define __PHANTOM_H 11#define __PHANTOM_H
12 12
13#include <asm/types.h> 13#include <linux/types.h>
14 14
15/* PHN_(G/S)ET_REG param */ 15/* PHN_(G/S)ET_REG param */
16struct phm_reg { 16struct phm_reg {
diff --git a/include/linux/radeonfb.h b/include/linux/radeonfb.h
index 5bd8975ed78e..8c4bbdecc44f 100644
--- a/include/linux/radeonfb.h
+++ b/include/linux/radeonfb.h
@@ -2,7 +2,7 @@
2#define __LINUX_RADEONFB_H__ 2#define __LINUX_RADEONFB_H__
3 3
4#include <asm/ioctl.h> 4#include <asm/ioctl.h>
5#include <asm/types.h> 5#include <linux/types.h>
6 6
7#define ATY_RADEON_LCD_ON 0x00000001 7#define ATY_RADEON_LCD_ON 0x00000001
8#define ATY_RADEON_CRT_ON 0x00000002 8#define ATY_RADEON_CRT_ON 0x00000002
diff --git a/include/linux/res_counter.h b/include/linux/res_counter.h
index dede0a2cfc45..4c5bcf6ca7e8 100644
--- a/include/linux/res_counter.h
+++ b/include/linux/res_counter.h
@@ -9,7 +9,7 @@
9 * 9 *
10 * Author: Pavel Emelianov <xemul@openvz.org> 10 * Author: Pavel Emelianov <xemul@openvz.org>
11 * 11 *
12 * See Documentation/controllers/resource_counter.txt for more 12 * See Documentation/cgroups/resource_counter.txt for more
13 * info about what this counter is. 13 * info about what this counter is.
14 */ 14 */
15 15
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 4cae9b81a1f8..02e16d207304 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -293,6 +293,9 @@ extern void sched_show_task(struct task_struct *p);
293extern void softlockup_tick(void); 293extern void softlockup_tick(void);
294extern void touch_softlockup_watchdog(void); 294extern void touch_softlockup_watchdog(void);
295extern void touch_all_softlockup_watchdogs(void); 295extern void touch_all_softlockup_watchdogs(void);
296extern int proc_dosoftlockup_thresh(struct ctl_table *table, int write,
297 struct file *filp, void __user *buffer,
298 size_t *lenp, loff_t *ppos);
296extern unsigned int softlockup_panic; 299extern unsigned int softlockup_panic;
297extern unsigned long sysctl_hung_task_check_count; 300extern unsigned long sysctl_hung_task_check_count;
298extern unsigned long sysctl_hung_task_timeout_secs; 301extern unsigned long sysctl_hung_task_timeout_secs;
@@ -450,6 +453,7 @@ struct task_cputime {
450 cputime_t utime; 453 cputime_t utime;
451 cputime_t stime; 454 cputime_t stime;
452 unsigned long long sum_exec_runtime; 455 unsigned long long sum_exec_runtime;
456 spinlock_t lock;
453}; 457};
454/* Alternate field names when used to cache expirations. */ 458/* Alternate field names when used to cache expirations. */
455#define prof_exp stime 459#define prof_exp stime
@@ -465,7 +469,7 @@ struct task_cputime {
465 * used for thread group CPU clock calculations. 469 * used for thread group CPU clock calculations.
466 */ 470 */
467struct thread_group_cputime { 471struct thread_group_cputime {
468 struct task_cputime *totals; 472 struct task_cputime totals;
469}; 473};
470 474
471/* 475/*
@@ -2180,24 +2184,30 @@ static inline int spin_needbreak(spinlock_t *lock)
2180 * Thread group CPU time accounting. 2184 * Thread group CPU time accounting.
2181 */ 2185 */
2182 2186
2183extern int thread_group_cputime_alloc(struct task_struct *); 2187static inline
2184extern void thread_group_cputime(struct task_struct *, struct task_cputime *); 2188void thread_group_cputime(struct task_struct *tsk, struct task_cputime *times)
2185
2186static inline void thread_group_cputime_init(struct signal_struct *sig)
2187{ 2189{
2188 sig->cputime.totals = NULL; 2190 struct task_cputime *totals = &tsk->signal->cputime.totals;
2191 unsigned long flags;
2192
2193 spin_lock_irqsave(&totals->lock, flags);
2194 *times = *totals;
2195 spin_unlock_irqrestore(&totals->lock, flags);
2189} 2196}
2190 2197
2191static inline int thread_group_cputime_clone_thread(struct task_struct *curr) 2198static inline void thread_group_cputime_init(struct signal_struct *sig)
2192{ 2199{
2193 if (curr->signal->cputime.totals) 2200 sig->cputime.totals = (struct task_cputime){
2194 return 0; 2201 .utime = cputime_zero,
2195 return thread_group_cputime_alloc(curr); 2202 .stime = cputime_zero,
2203 .sum_exec_runtime = 0,
2204 };
2205
2206 spin_lock_init(&sig->cputime.totals.lock);
2196} 2207}
2197 2208
2198static inline void thread_group_cputime_free(struct signal_struct *sig) 2209static inline void thread_group_cputime_free(struct signal_struct *sig)
2199{ 2210{
2200 free_percpu(sig->cputime.totals);
2201} 2211}
2202 2212
2203/* 2213/*
diff --git a/include/linux/smp.h b/include/linux/smp.h
index b82466968101..715196b09d67 100644
--- a/include/linux/smp.h
+++ b/include/linux/smp.h
@@ -24,6 +24,9 @@ struct call_single_data {
24/* total number of cpus in this system (may exceed NR_CPUS) */ 24/* total number of cpus in this system (may exceed NR_CPUS) */
25extern unsigned int total_cpus; 25extern unsigned int total_cpus;
26 26
27int smp_call_function_single(int cpuid, void (*func) (void *info), void *info,
28 int wait);
29
27#ifdef CONFIG_SMP 30#ifdef CONFIG_SMP
28 31
29#include <linux/preempt.h> 32#include <linux/preempt.h>
@@ -79,8 +82,6 @@ smp_call_function_mask(cpumask_t mask, void(*func)(void *info), void *info,
79 return 0; 82 return 0;
80} 83}
81 84
82int smp_call_function_single(int cpuid, void (*func) (void *info), void *info,
83 int wait);
84void __smp_call_function_single(int cpuid, struct call_single_data *data); 85void __smp_call_function_single(int cpuid, struct call_single_data *data);
85 86
86/* 87/*
@@ -140,14 +141,6 @@ static inline int up_smp_call_function(void (*func)(void *), void *info)
140static inline void smp_send_reschedule(int cpu) { } 141static inline void smp_send_reschedule(int cpu) { }
141#define num_booting_cpus() 1 142#define num_booting_cpus() 1
142#define smp_prepare_boot_cpu() do {} while (0) 143#define smp_prepare_boot_cpu() do {} while (0)
143#define smp_call_function_single(cpuid, func, info, wait) \
144({ \
145 WARN_ON(cpuid != 0); \
146 local_irq_disable(); \
147 (func)(info); \
148 local_irq_enable(); \
149 0; \
150})
151#define smp_call_function_mask(mask, func, info, wait) \ 144#define smp_call_function_mask(mask, func, info, wait) \
152 (up_smp_call_function(func, info)) 145 (up_smp_call_function(func, info))
153#define smp_call_function_many(mask, func, info, wait) \ 146#define smp_call_function_many(mask, func, info, wait) \
diff --git a/include/linux/swab.h b/include/linux/swab.h
index be5284d4a053..ea0c02fd5163 100644
--- a/include/linux/swab.h
+++ b/include/linux/swab.h
@@ -3,7 +3,7 @@
3 3
4#include <linux/types.h> 4#include <linux/types.h>
5#include <linux/compiler.h> 5#include <linux/compiler.h>
6#include <asm/byteorder.h> 6#include <asm/swab.h>
7 7
8/* 8/*
9 * casts are necessary for constants, because we never know how for sure 9 * casts are necessary for constants, because we never know how for sure
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 18d0a243a7b3..16875f89e6a7 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -54,6 +54,7 @@ struct compat_stat;
54struct compat_timeval; 54struct compat_timeval;
55struct robust_list_head; 55struct robust_list_head;
56struct getcpu_cache; 56struct getcpu_cache;
57struct old_linux_dirent;
57 58
58#include <linux/types.h> 59#include <linux/types.h>
59#include <linux/aio_abi.h> 60#include <linux/aio_abi.h>
@@ -65,6 +66,74 @@ struct getcpu_cache;
65#include <linux/quota.h> 66#include <linux/quota.h>
66#include <linux/key.h> 67#include <linux/key.h>
67 68
69#define __SC_DECL1(t1, a1) t1 a1
70#define __SC_DECL2(t2, a2, ...) t2 a2, __SC_DECL1(__VA_ARGS__)
71#define __SC_DECL3(t3, a3, ...) t3 a3, __SC_DECL2(__VA_ARGS__)
72#define __SC_DECL4(t4, a4, ...) t4 a4, __SC_DECL3(__VA_ARGS__)
73#define __SC_DECL5(t5, a5, ...) t5 a5, __SC_DECL4(__VA_ARGS__)
74#define __SC_DECL6(t6, a6, ...) t6 a6, __SC_DECL5(__VA_ARGS__)
75
76#define __SC_LONG1(t1, a1) long a1
77#define __SC_LONG2(t2, a2, ...) long a2, __SC_LONG1(__VA_ARGS__)
78#define __SC_LONG3(t3, a3, ...) long a3, __SC_LONG2(__VA_ARGS__)
79#define __SC_LONG4(t4, a4, ...) long a4, __SC_LONG3(__VA_ARGS__)
80#define __SC_LONG5(t5, a5, ...) long a5, __SC_LONG4(__VA_ARGS__)
81#define __SC_LONG6(t6, a6, ...) long a6, __SC_LONG5(__VA_ARGS__)
82
83#define __SC_CAST1(t1, a1) (t1) a1
84#define __SC_CAST2(t2, a2, ...) (t2) a2, __SC_CAST1(__VA_ARGS__)
85#define __SC_CAST3(t3, a3, ...) (t3) a3, __SC_CAST2(__VA_ARGS__)
86#define __SC_CAST4(t4, a4, ...) (t4) a4, __SC_CAST3(__VA_ARGS__)
87#define __SC_CAST5(t5, a5, ...) (t5) a5, __SC_CAST4(__VA_ARGS__)
88#define __SC_CAST6(t6, a6, ...) (t6) a6, __SC_CAST5(__VA_ARGS__)
89
90#define __SC_TEST(type) BUILD_BUG_ON(sizeof(type) > sizeof(long))
91#define __SC_TEST1(t1, a1) __SC_TEST(t1)
92#define __SC_TEST2(t2, a2, ...) __SC_TEST(t2); __SC_TEST1(__VA_ARGS__)
93#define __SC_TEST3(t3, a3, ...) __SC_TEST(t3); __SC_TEST2(__VA_ARGS__)
94#define __SC_TEST4(t4, a4, ...) __SC_TEST(t4); __SC_TEST3(__VA_ARGS__)
95#define __SC_TEST5(t5, a5, ...) __SC_TEST(t5); __SC_TEST4(__VA_ARGS__)
96#define __SC_TEST6(t6, a6, ...) __SC_TEST(t6); __SC_TEST5(__VA_ARGS__)
97
98#define SYSCALL_DEFINE0(name) asmlinkage long sys_##name(void)
99#define SYSCALL_DEFINE1(...) SYSCALL_DEFINEx(1, __VA_ARGS__)
100#define SYSCALL_DEFINE2(...) SYSCALL_DEFINEx(2, __VA_ARGS__)
101#define SYSCALL_DEFINE3(...) SYSCALL_DEFINEx(3, __VA_ARGS__)
102#define SYSCALL_DEFINE4(...) SYSCALL_DEFINEx(4, __VA_ARGS__)
103#define SYSCALL_DEFINE5(...) SYSCALL_DEFINEx(5, __VA_ARGS__)
104#define SYSCALL_DEFINE6(...) SYSCALL_DEFINEx(6, __VA_ARGS__)
105
106#ifdef CONFIG_PPC64
107#define SYSCALL_ALIAS(alias, name) \
108 asm ("\t.globl " #alias "\n\t.set " #alias ", " #name "\n" \
109 "\t.globl ." #alias "\n\t.set ." #alias ", ." #name)
110#else
111#define SYSCALL_ALIAS(alias, name) \
112 asm ("\t.globl " #alias "\n\t.set " #alias ", " #name)
113#endif
114
115#ifdef CONFIG_HAVE_SYSCALL_WRAPPERS
116
117#define SYSCALL_DEFINE(name) static inline long SYSC_##name
118#define SYSCALL_DEFINEx(x, name, ...) \
119 asmlinkage long sys_##name(__SC_DECL##x(__VA_ARGS__)); \
120 static inline long SYSC_##name(__SC_DECL##x(__VA_ARGS__)); \
121 asmlinkage long SyS_##name(__SC_LONG##x(__VA_ARGS__)) \
122 { \
123 __SC_TEST##x(__VA_ARGS__); \
124 return (long) SYSC_##name(__SC_CAST##x(__VA_ARGS__)); \
125 } \
126 SYSCALL_ALIAS(sys_##name, SyS_##name); \
127 static inline long SYSC_##name(__SC_DECL##x(__VA_ARGS__))
128
129#else /* CONFIG_HAVE_SYSCALL_WRAPPERS */
130
131#define SYSCALL_DEFINE(name) asmlinkage long sys_##name
132#define SYSCALL_DEFINEx(x, name, ...) \
133 asmlinkage long sys_##name(__SC_DECL##x(__VA_ARGS__))
134
135#endif /* CONFIG_HAVE_SYSCALL_WRAPPERS */
136
68asmlinkage long sys_time(time_t __user *tloc); 137asmlinkage long sys_time(time_t __user *tloc);
69asmlinkage long sys_stime(time_t __user *tptr); 138asmlinkage long sys_stime(time_t __user *tptr);
70asmlinkage long sys_gettimeofday(struct timeval __user *tv, 139asmlinkage long sys_gettimeofday(struct timeval __user *tv,
@@ -77,7 +146,7 @@ asmlinkage long sys_times(struct tms __user *tbuf);
77 146
78asmlinkage long sys_gettid(void); 147asmlinkage long sys_gettid(void);
79asmlinkage long sys_nanosleep(struct timespec __user *rqtp, struct timespec __user *rmtp); 148asmlinkage long sys_nanosleep(struct timespec __user *rqtp, struct timespec __user *rmtp);
80asmlinkage unsigned long sys_alarm(unsigned int seconds); 149asmlinkage long sys_alarm(unsigned int seconds);
81asmlinkage long sys_getpid(void); 150asmlinkage long sys_getpid(void);
82asmlinkage long sys_getppid(void); 151asmlinkage long sys_getppid(void);
83asmlinkage long sys_getuid(void); 152asmlinkage long sys_getuid(void);
@@ -166,7 +235,7 @@ asmlinkage long sys_kexec_load(unsigned long entry, unsigned long nr_segments,
166 unsigned long flags); 235 unsigned long flags);
167 236
168asmlinkage long sys_exit(int error_code); 237asmlinkage long sys_exit(int error_code);
169asmlinkage void sys_exit_group(int error_code); 238asmlinkage long sys_exit_group(int error_code);
170asmlinkage long sys_wait4(pid_t pid, int __user *stat_addr, 239asmlinkage long sys_wait4(pid_t pid, int __user *stat_addr,
171 int options, struct rusage __user *ru); 240 int options, struct rusage __user *ru);
172asmlinkage long sys_waitid(int which, pid_t pid, 241asmlinkage long sys_waitid(int which, pid_t pid,
@@ -196,7 +265,7 @@ asmlinkage long sys_tkill(int pid, int sig);
196asmlinkage long sys_rt_sigqueueinfo(int pid, int sig, siginfo_t __user *uinfo); 265asmlinkage long sys_rt_sigqueueinfo(int pid, int sig, siginfo_t __user *uinfo);
197asmlinkage long sys_sgetmask(void); 266asmlinkage long sys_sgetmask(void);
198asmlinkage long sys_ssetmask(int newmask); 267asmlinkage long sys_ssetmask(int newmask);
199asmlinkage unsigned long sys_signal(int sig, __sighandler_t handler); 268asmlinkage long sys_signal(int sig, __sighandler_t handler);
200asmlinkage long sys_pause(void); 269asmlinkage long sys_pause(void);
201 270
202asmlinkage long sys_sync(void); 271asmlinkage long sys_sync(void);
@@ -246,29 +315,29 @@ asmlinkage long sys_lsetxattr(const char __user *path, const char __user *name,
246 const void __user *value, size_t size, int flags); 315 const void __user *value, size_t size, int flags);
247asmlinkage long sys_fsetxattr(int fd, const char __user *name, 316asmlinkage long sys_fsetxattr(int fd, const char __user *name,
248 const void __user *value, size_t size, int flags); 317 const void __user *value, size_t size, int flags);
249asmlinkage ssize_t sys_getxattr(const char __user *path, const char __user *name, 318asmlinkage long sys_getxattr(const char __user *path, const char __user *name,
250 void __user *value, size_t size); 319 void __user *value, size_t size);
251asmlinkage ssize_t sys_lgetxattr(const char __user *path, const char __user *name, 320asmlinkage long sys_lgetxattr(const char __user *path, const char __user *name,
252 void __user *value, size_t size); 321 void __user *value, size_t size);
253asmlinkage ssize_t sys_fgetxattr(int fd, const char __user *name, 322asmlinkage long sys_fgetxattr(int fd, const char __user *name,
254 void __user *value, size_t size); 323 void __user *value, size_t size);
255asmlinkage ssize_t sys_listxattr(const char __user *path, char __user *list, 324asmlinkage long sys_listxattr(const char __user *path, char __user *list,
256 size_t size); 325 size_t size);
257asmlinkage ssize_t sys_llistxattr(const char __user *path, char __user *list, 326asmlinkage long sys_llistxattr(const char __user *path, char __user *list,
258 size_t size); 327 size_t size);
259asmlinkage ssize_t sys_flistxattr(int fd, char __user *list, size_t size); 328asmlinkage long sys_flistxattr(int fd, char __user *list, size_t size);
260asmlinkage long sys_removexattr(const char __user *path, 329asmlinkage long sys_removexattr(const char __user *path,
261 const char __user *name); 330 const char __user *name);
262asmlinkage long sys_lremovexattr(const char __user *path, 331asmlinkage long sys_lremovexattr(const char __user *path,
263 const char __user *name); 332 const char __user *name);
264asmlinkage long sys_fremovexattr(int fd, const char __user *name); 333asmlinkage long sys_fremovexattr(int fd, const char __user *name);
265 334
266asmlinkage unsigned long sys_brk(unsigned long brk); 335asmlinkage long sys_brk(unsigned long brk);
267asmlinkage long sys_mprotect(unsigned long start, size_t len, 336asmlinkage long sys_mprotect(unsigned long start, size_t len,
268 unsigned long prot); 337 unsigned long prot);
269asmlinkage unsigned long sys_mremap(unsigned long addr, 338asmlinkage long sys_mremap(unsigned long addr,
270 unsigned long old_len, unsigned long new_len, 339 unsigned long old_len, unsigned long new_len,
271 unsigned long flags, unsigned long new_addr); 340 unsigned long flags, unsigned long new_addr);
272asmlinkage long sys_remap_file_pages(unsigned long start, unsigned long size, 341asmlinkage long sys_remap_file_pages(unsigned long start, unsigned long size,
273 unsigned long prot, unsigned long pgoff, 342 unsigned long prot, unsigned long pgoff,
274 unsigned long flags); 343 unsigned long flags);
@@ -321,10 +390,10 @@ asmlinkage long sys_io_submit(aio_context_t, long,
321 struct iocb __user * __user *); 390 struct iocb __user * __user *);
322asmlinkage long sys_io_cancel(aio_context_t ctx_id, struct iocb __user *iocb, 391asmlinkage long sys_io_cancel(aio_context_t ctx_id, struct iocb __user *iocb,
323 struct io_event __user *result); 392 struct io_event __user *result);
324asmlinkage ssize_t sys_sendfile(int out_fd, int in_fd, 393asmlinkage long sys_sendfile(int out_fd, int in_fd,
325 off_t __user *offset, size_t count); 394 off_t __user *offset, size_t count);
326asmlinkage ssize_t sys_sendfile64(int out_fd, int in_fd, 395asmlinkage long sys_sendfile64(int out_fd, int in_fd,
327 loff_t __user *offset, size_t count); 396 loff_t __user *offset, size_t count);
328asmlinkage long sys_readlink(const char __user *path, 397asmlinkage long sys_readlink(const char __user *path,
329 char __user *buf, int bufsiz); 398 char __user *buf, int bufsiz);
330asmlinkage long sys_creat(const char __user *pathname, int mode); 399asmlinkage long sys_creat(const char __user *pathname, int mode);
@@ -368,26 +437,25 @@ asmlinkage long sys_utime(char __user *filename,
368 struct utimbuf __user *times); 437 struct utimbuf __user *times);
369asmlinkage long sys_utimes(char __user *filename, 438asmlinkage long sys_utimes(char __user *filename,
370 struct timeval __user *utimes); 439 struct timeval __user *utimes);
371asmlinkage off_t sys_lseek(unsigned int fd, off_t offset, 440asmlinkage long sys_lseek(unsigned int fd, off_t offset,
372 unsigned int origin); 441 unsigned int origin);
373asmlinkage long sys_llseek(unsigned int fd, unsigned long offset_high, 442asmlinkage long sys_llseek(unsigned int fd, unsigned long offset_high,
374 unsigned long offset_low, loff_t __user *result, 443 unsigned long offset_low, loff_t __user *result,
375 unsigned int origin); 444 unsigned int origin);
376asmlinkage ssize_t sys_read(unsigned int fd, char __user *buf, 445asmlinkage long sys_read(unsigned int fd, char __user *buf, size_t count);
377 size_t count); 446asmlinkage long sys_readahead(int fd, loff_t offset, size_t count);
378asmlinkage ssize_t sys_readahead(int fd, loff_t offset, size_t count); 447asmlinkage long sys_readv(unsigned long fd,
379asmlinkage ssize_t sys_readv(unsigned long fd, 448 const struct iovec __user *vec,
380 const struct iovec __user *vec, 449 unsigned long vlen);
381 unsigned long vlen); 450asmlinkage long sys_write(unsigned int fd, const char __user *buf,
382asmlinkage ssize_t sys_write(unsigned int fd, const char __user *buf, 451 size_t count);
383 size_t count); 452asmlinkage long sys_writev(unsigned long fd,
384asmlinkage ssize_t sys_writev(unsigned long fd, 453 const struct iovec __user *vec,
385 const struct iovec __user *vec, 454 unsigned long vlen);
386 unsigned long vlen); 455asmlinkage long sys_pread64(unsigned int fd, char __user *buf,
387asmlinkage ssize_t sys_pread64(unsigned int fd, char __user *buf, 456 size_t count, loff_t pos);
388 size_t count, loff_t pos); 457asmlinkage long sys_pwrite64(unsigned int fd, const char __user *buf,
389asmlinkage ssize_t sys_pwrite64(unsigned int fd, const char __user *buf, 458 size_t count, loff_t pos);
390 size_t count, loff_t pos);
391asmlinkage long sys_getcwd(char __user *buf, unsigned long size); 459asmlinkage long sys_getcwd(char __user *buf, unsigned long size);
392asmlinkage long sys_mkdir(const char __user *pathname, int mode); 460asmlinkage long sys_mkdir(const char __user *pathname, int mode);
393asmlinkage long sys_chdir(const char __user *filename); 461asmlinkage long sys_chdir(const char __user *filename);
@@ -476,7 +544,7 @@ asmlinkage long sys_shmctl(int shmid, int cmd, struct shmid_ds __user *buf);
476asmlinkage long sys_mq_open(const char __user *name, int oflag, mode_t mode, struct mq_attr __user *attr); 544asmlinkage long sys_mq_open(const char __user *name, int oflag, mode_t mode, struct mq_attr __user *attr);
477asmlinkage long sys_mq_unlink(const char __user *name); 545asmlinkage long sys_mq_unlink(const char __user *name);
478asmlinkage long sys_mq_timedsend(mqd_t mqdes, const char __user *msg_ptr, size_t msg_len, unsigned int msg_prio, const struct timespec __user *abs_timeout); 546asmlinkage long sys_mq_timedsend(mqd_t mqdes, const char __user *msg_ptr, size_t msg_len, unsigned int msg_prio, const struct timespec __user *abs_timeout);
479asmlinkage ssize_t sys_mq_timedreceive(mqd_t mqdes, char __user *msg_ptr, size_t msg_len, unsigned int __user *msg_prio, const struct timespec __user *abs_timeout); 547asmlinkage long sys_mq_timedreceive(mqd_t mqdes, char __user *msg_ptr, size_t msg_len, unsigned int __user *msg_prio, const struct timespec __user *abs_timeout);
480asmlinkage long sys_mq_notify(mqd_t mqdes, const struct sigevent __user *notification); 548asmlinkage long sys_mq_notify(mqd_t mqdes, const struct sigevent __user *notification);
481asmlinkage long sys_mq_getsetattr(mqd_t mqdes, const struct mq_attr __user *mqstat, struct mq_attr __user *omqstat); 549asmlinkage long sys_mq_getsetattr(mqd_t mqdes, const struct mq_attr __user *mqstat, struct mq_attr __user *omqstat);
482 550
@@ -530,11 +598,6 @@ asmlinkage long sys_move_pages(pid_t pid, unsigned long nr_pages,
530 const int __user *nodes, 598 const int __user *nodes,
531 int __user *status, 599 int __user *status,
532 int flags); 600 int flags);
533asmlinkage long compat_sys_move_pages(pid_t pid, unsigned long nr_page,
534 __u32 __user *pages,
535 const int __user *nodes,
536 int __user *status,
537 int flags);
538asmlinkage long sys_mbind(unsigned long start, unsigned long len, 601asmlinkage long sys_mbind(unsigned long start, unsigned long len,
539 unsigned long mode, 602 unsigned long mode,
540 unsigned long __user *nmask, 603 unsigned long __user *nmask,
@@ -583,13 +646,6 @@ asmlinkage long sys_readlinkat(int dfd, const char __user *path, char __user *bu
583 int bufsiz); 646 int bufsiz);
584asmlinkage long sys_utimensat(int dfd, char __user *filename, 647asmlinkage long sys_utimensat(int dfd, char __user *filename,
585 struct timespec __user *utimes, int flags); 648 struct timespec __user *utimes, int flags);
586asmlinkage long compat_sys_futimesat(unsigned int dfd, char __user *filename,
587 struct compat_timeval __user *t);
588asmlinkage long compat_sys_newfstatat(unsigned int dfd, char __user * filename,
589 struct compat_stat __user *statbuf,
590 int flag);
591asmlinkage long compat_sys_openat(unsigned int dfd, const char __user *filename,
592 int flags, int mode);
593asmlinkage long sys_unshare(unsigned long unshare_flags); 649asmlinkage long sys_unshare(unsigned long unshare_flags);
594 650
595asmlinkage long sys_splice(int fd_in, loff_t __user *off_in, 651asmlinkage long sys_splice(int fd_in, loff_t __user *off_in,
@@ -621,6 +677,15 @@ asmlinkage long sys_timerfd_gettime(int ufd, struct itimerspec __user *otmr);
621asmlinkage long sys_eventfd(unsigned int count); 677asmlinkage long sys_eventfd(unsigned int count);
622asmlinkage long sys_eventfd2(unsigned int count, int flags); 678asmlinkage long sys_eventfd2(unsigned int count, int flags);
623asmlinkage long sys_fallocate(int fd, int mode, loff_t offset, loff_t len); 679asmlinkage long sys_fallocate(int fd, int mode, loff_t offset, loff_t len);
680asmlinkage long sys_old_readdir(unsigned int, struct old_linux_dirent __user *, unsigned int);
681asmlinkage long sys_pselect6(int, fd_set __user *, fd_set __user *,
682 fd_set __user *, struct timespec __user *,
683 void __user *);
684asmlinkage long sys_ppoll(struct pollfd __user *, unsigned int,
685 struct timespec __user *, const sigset_t __user *,
686 size_t);
687asmlinkage long sys_pipe2(int __user *, int);
688asmlinkage long sys_pipe(int __user *);
624 689
625int kernel_execve(const char *filename, char *const argv[], char *const envp[]); 690int kernel_execve(const char *filename, char *const argv[], char *const envp[]);
626 691
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h
index b36291130f22..3cd51e579ab1 100644
--- a/include/linux/workqueue.h
+++ b/include/linux/workqueue.h
@@ -118,12 +118,24 @@ struct execute_work {
118 init_timer(&(_work)->timer); \ 118 init_timer(&(_work)->timer); \
119 } while (0) 119 } while (0)
120 120
121#define INIT_DELAYED_WORK_ON_STACK(_work, _func) \
122 do { \
123 INIT_WORK(&(_work)->work, (_func)); \
124 init_timer_on_stack(&(_work)->timer); \
125 } while (0)
126
121#define INIT_DELAYED_WORK_DEFERRABLE(_work, _func) \ 127#define INIT_DELAYED_WORK_DEFERRABLE(_work, _func) \
122 do { \ 128 do { \
123 INIT_WORK(&(_work)->work, (_func)); \ 129 INIT_WORK(&(_work)->work, (_func)); \
124 init_timer_deferrable(&(_work)->timer); \ 130 init_timer_deferrable(&(_work)->timer); \
125 } while (0) 131 } while (0)
126 132
133#define INIT_DELAYED_WORK_ON_STACK(_work, _func) \
134 do { \
135 INIT_WORK(&(_work)->work, (_func)); \
136 init_timer_on_stack(&(_work)->timer); \
137 } while (0)
138
127/** 139/**
128 * work_pending - Find out whether a work item is currently pending 140 * work_pending - Find out whether a work item is currently pending
129 * @work: The work item in question 141 * @work: The work item in question
diff --git a/include/net/wimax.h b/include/net/wimax.h
index 073809ce94f8..6b3824edb39e 100644
--- a/include/net/wimax.h
+++ b/include/net/wimax.h
@@ -323,8 +323,8 @@ struct input_dev;
323 * 323 *
324 * @rf_hw: [private] State of the hardware radio switch (OFF/ON) 324 * @rf_hw: [private] State of the hardware radio switch (OFF/ON)
325 * 325 *
326 * @debufs_dentry: [private] Used to hook up a debugfs entry. This 326 * @debugfs_dentry: [private] Used to hook up a debugfs entry. This
327 * shows up in the debugfs root as wimax:DEVICENAME. 327 * shows up in the debugfs root as wimax\:DEVICENAME.
328 * 328 *
329 * Description: 329 * Description:
330 * This structure defines a common interface to access all WiMAX 330 * This structure defines a common interface to access all WiMAX
diff --git a/include/scsi/libiscsi_tcp.h b/include/scsi/libiscsi_tcp.h
index 83e32f6d7859..9e3182e659db 100644
--- a/include/scsi/libiscsi_tcp.h
+++ b/include/scsi/libiscsi_tcp.h
@@ -39,6 +39,7 @@ struct iscsi_segment {
39 unsigned int total_copied; 39 unsigned int total_copied;
40 40
41 struct hash_desc *hash; 41 struct hash_desc *hash;
42 unsigned char padbuf[ISCSI_PAD_LEN];
42 unsigned char recv_digest[ISCSI_DIGEST_SIZE]; 43 unsigned char recv_digest[ISCSI_DIGEST_SIZE];
43 unsigned char digest[ISCSI_DIGEST_SIZE]; 44 unsigned char digest[ISCSI_DIGEST_SIZE];
44 unsigned int digest_len; 45 unsigned int digest_len;
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index 4af1083e3287..dfa804958820 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -108,7 +108,7 @@
108#define SND_SOC_DAPM_SWITCH_E(wname, wreg, wshift, winvert, wcontrols, \ 108#define SND_SOC_DAPM_SWITCH_E(wname, wreg, wshift, winvert, wcontrols, \
109 wevent, wflags) \ 109 wevent, wflags) \
110{ .id = snd_soc_dapm_switch, .name = wname, .reg = wreg, .shift = wshift, \ 110{ .id = snd_soc_dapm_switch, .name = wname, .reg = wreg, .shift = wshift, \
111 .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = 1 \ 111 .invert = winvert, .kcontrols = wcontrols, .num_kcontrols = 1, \
112 .event = wevent, .event_flags = wflags} 112 .event = wevent, .event_flags = wflags}
113#define SND_SOC_DAPM_MUX_E(wname, wreg, wshift, winvert, wcontrols, \ 113#define SND_SOC_DAPM_MUX_E(wname, wreg, wshift, winvert, wcontrols, \
114 wevent, wflags) \ 114 wevent, wflags) \
@@ -178,7 +178,7 @@
178 .private_value = (unsigned long)&xenum } 178 .private_value = (unsigned long)&xenum }
179#define SOC_DAPM_VALUE_ENUM(xname, xenum) \ 179#define SOC_DAPM_VALUE_ENUM(xname, xenum) \
180{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \ 180{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
181 .info = snd_soc_info_value_enum_double, \ 181 .info = snd_soc_info_enum_double, \
182 .get = snd_soc_dapm_get_value_enum_double, \ 182 .get = snd_soc_dapm_get_value_enum_double, \
183 .put = snd_soc_dapm_put_value_enum_double, \ 183 .put = snd_soc_dapm_put_value_enum_double, \
184 .private_value = (unsigned long)&xenum } 184 .private_value = (unsigned long)&xenum }
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 9b930d342116..24593ac3ea19 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -106,7 +106,7 @@
106 .private_value = (unsigned long)&xenum } 106 .private_value = (unsigned long)&xenum }
107#define SOC_VALUE_ENUM(xname, xenum) \ 107#define SOC_VALUE_ENUM(xname, xenum) \
108{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname,\ 108{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname,\
109 .info = snd_soc_info_value_enum_double, \ 109 .info = snd_soc_info_enum_double, \
110 .get = snd_soc_get_value_enum_double, \ 110 .get = snd_soc_get_value_enum_double, \
111 .put = snd_soc_put_value_enum_double, \ 111 .put = snd_soc_put_value_enum_double, \
112 .private_value = (unsigned long)&xenum } 112 .private_value = (unsigned long)&xenum }
@@ -211,8 +211,6 @@ int snd_soc_get_enum_double(struct snd_kcontrol *kcontrol,
211 struct snd_ctl_elem_value *ucontrol); 211 struct snd_ctl_elem_value *ucontrol);
212int snd_soc_put_enum_double(struct snd_kcontrol *kcontrol, 212int snd_soc_put_enum_double(struct snd_kcontrol *kcontrol,
213 struct snd_ctl_elem_value *ucontrol); 213 struct snd_ctl_elem_value *ucontrol);
214int snd_soc_info_value_enum_double(struct snd_kcontrol *kcontrol,
215 struct snd_ctl_elem_info *uinfo);
216int snd_soc_get_value_enum_double(struct snd_kcontrol *kcontrol, 214int snd_soc_get_value_enum_double(struct snd_kcontrol *kcontrol,
217 struct snd_ctl_elem_value *ucontrol); 215 struct snd_ctl_elem_value *ucontrol);
218int snd_soc_put_value_enum_double(struct snd_kcontrol *kcontrol, 216int snd_soc_put_value_enum_double(struct snd_kcontrol *kcontrol,
@@ -419,17 +417,6 @@ struct soc_enum {
419 unsigned char shift_l; 417 unsigned char shift_l;
420 unsigned char shift_r; 418 unsigned char shift_r;
421 unsigned int max; 419 unsigned int max;
422 const char **texts;
423 void *dapm;
424};
425
426/* semi enumerated kcontrol */
427struct soc_value_enum {
428 unsigned short reg;
429 unsigned short reg2;
430 unsigned char shift_l;
431 unsigned char shift_r;
432 unsigned int max;
433 unsigned int mask; 420 unsigned int mask;
434 const char **texts; 421 const char **texts;
435 const unsigned int *values; 422 const unsigned int *values;