aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2012-04-17 05:13:03 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-04-17 05:16:20 -0400
commit767878908e7cc28c440c5431f6591157d8bd4ae7 (patch)
tree5780a93e07a5643e7ee33136f54b15dd7b9cab54 /include
parent17038de5f16569a25343cf68668f3b657eafb00e (diff)
parente816b57a337ea3b755de72bec38c10c864f23015 (diff)
Merge tag 'v3.4-rc3' into drm-intel-next-queued
Backmerge Linux 3.4-rc3 into drm-intel-next to resolve a few things that conflict/depend upon patches in -rc3: - Second part of the Sandybridge workaround series - it changes some of the same registers. - Preparation for Chris Wilson's fencing cleanup - we need the fix from -rc3 merged before we can move around all that code. - Resolve the gmbus conflict - gmbus has been disabled in 3.4 again, but should be enabled on all generations in 3.5. Conflicts: drivers/gpu/drm/i915/intel_i2c.c Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'include')
-rw-r--r--include/drm/exynos_drm.h5
-rw-r--r--include/linux/amba/bus.h7
-rw-r--r--include/linux/amba/pl022.h2
-rw-r--r--include/linux/blkdev.h18
-rw-r--r--include/linux/dmaengine.h1
-rw-r--r--include/linux/irq.h5
-rw-r--r--include/linux/irqdomain.h12
-rw-r--r--include/linux/kconfig.h22
-rw-r--r--include/linux/netfilter_ipv6/ip6_tables.h12
-rw-r--r--include/linux/serial_core.h2
-rw-r--r--include/linux/skbuff.h13
-rw-r--r--include/linux/stddef.h8
-rw-r--r--include/linux/types.h6
-rw-r--r--include/linux/usb/serial.h8
-rw-r--r--include/linux/vgaarb.h2
-rw-r--r--include/net/bluetooth/hci.h3
-rw-r--r--include/net/bluetooth/hci_core.h12
-rw-r--r--include/net/bluetooth/mgmt.h2
-rw-r--r--include/net/mac80211.h2
-rw-r--r--include/scsi/scsi_cmnd.h3
-rw-r--r--include/sound/core.h10
21 files changed, 99 insertions, 56 deletions
diff --git a/include/drm/exynos_drm.h b/include/drm/exynos_drm.h
index 3963116083ae..e478de4e5d56 100644
--- a/include/drm/exynos_drm.h
+++ b/include/drm/exynos_drm.h
@@ -85,7 +85,7 @@ struct drm_exynos_gem_mmap {
85struct drm_exynos_vidi_connection { 85struct drm_exynos_vidi_connection {
86 unsigned int connection; 86 unsigned int connection;
87 unsigned int extensions; 87 unsigned int extensions;
88 uint64_t *edid; 88 uint64_t edid;
89}; 89};
90 90
91struct drm_exynos_plane_set_zpos { 91struct drm_exynos_plane_set_zpos {
@@ -96,7 +96,8 @@ struct drm_exynos_plane_set_zpos {
96/* memory type definitions. */ 96/* memory type definitions. */
97enum e_drm_exynos_gem_mem_type { 97enum e_drm_exynos_gem_mem_type {
98 /* Physically Non-Continuous memory. */ 98 /* Physically Non-Continuous memory. */
99 EXYNOS_BO_NONCONTIG = 1 << 0 99 EXYNOS_BO_NONCONTIG = 1 << 0,
100 EXYNOS_BO_MASK = EXYNOS_BO_NONCONTIG
100}; 101};
101 102
102#define DRM_EXYNOS_GEM_CREATE 0x00 103#define DRM_EXYNOS_GEM_CREATE 0x00
diff --git a/include/linux/amba/bus.h b/include/linux/amba/bus.h
index 7847e197730a..8d54f79457ba 100644
--- a/include/linux/amba/bus.h
+++ b/include/linux/amba/bus.h
@@ -30,7 +30,6 @@ struct amba_device {
30 struct device dev; 30 struct device dev;
31 struct resource res; 31 struct resource res;
32 struct clk *pclk; 32 struct clk *pclk;
33 struct regulator *vcore;
34 u64 dma_mask; 33 u64 dma_mask;
35 unsigned int periphid; 34 unsigned int periphid;
36 unsigned int irq[AMBA_NR_IRQS]; 35 unsigned int irq[AMBA_NR_IRQS];
@@ -75,12 +74,6 @@ void amba_release_regions(struct amba_device *);
75#define amba_pclk_disable(d) \ 74#define amba_pclk_disable(d) \
76 do { if (!IS_ERR((d)->pclk)) clk_disable((d)->pclk); } while (0) 75 do { if (!IS_ERR((d)->pclk)) clk_disable((d)->pclk); } while (0)
77 76
78#define amba_vcore_enable(d) \
79 (IS_ERR((d)->vcore) ? 0 : regulator_enable((d)->vcore))
80
81#define amba_vcore_disable(d) \
82 do { if (!IS_ERR((d)->vcore)) regulator_disable((d)->vcore); } while (0)
83
84/* Some drivers don't use the struct amba_device */ 77/* Some drivers don't use the struct amba_device */
85#define AMBA_CONFIG_BITS(a) (((a) >> 24) & 0xff) 78#define AMBA_CONFIG_BITS(a) (((a) >> 24) & 0xff)
86#define AMBA_REV_BITS(a) (((a) >> 20) & 0x0f) 79#define AMBA_REV_BITS(a) (((a) >> 20) & 0x0f)
diff --git a/include/linux/amba/pl022.h b/include/linux/amba/pl022.h
index b8c51124ed19..76dd1b199a1b 100644
--- a/include/linux/amba/pl022.h
+++ b/include/linux/amba/pl022.h
@@ -25,6 +25,8 @@
25#ifndef _SSP_PL022_H 25#ifndef _SSP_PL022_H
26#define _SSP_PL022_H 26#define _SSP_PL022_H
27 27
28#include <linux/types.h>
29
28/** 30/**
29 * whether SSP is in loopback mode or not 31 * whether SSP is in loopback mode or not
30 */ 32 */
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 606cf339bb56..2aa24664a5b5 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -426,14 +426,10 @@ struct request_queue {
426 (1 << QUEUE_FLAG_SAME_COMP) | \ 426 (1 << QUEUE_FLAG_SAME_COMP) | \
427 (1 << QUEUE_FLAG_ADD_RANDOM)) 427 (1 << QUEUE_FLAG_ADD_RANDOM))
428 428
429static inline int queue_is_locked(struct request_queue *q) 429static inline void queue_lockdep_assert_held(struct request_queue *q)
430{ 430{
431#ifdef CONFIG_SMP 431 if (q->queue_lock)
432 spinlock_t *lock = q->queue_lock; 432 lockdep_assert_held(q->queue_lock);
433 return lock && spin_is_locked(lock);
434#else
435 return 1;
436#endif
437} 433}
438 434
439static inline void queue_flag_set_unlocked(unsigned int flag, 435static inline void queue_flag_set_unlocked(unsigned int flag,
@@ -445,7 +441,7 @@ static inline void queue_flag_set_unlocked(unsigned int flag,
445static inline int queue_flag_test_and_clear(unsigned int flag, 441static inline int queue_flag_test_and_clear(unsigned int flag,
446 struct request_queue *q) 442 struct request_queue *q)
447{ 443{
448 WARN_ON_ONCE(!queue_is_locked(q)); 444 queue_lockdep_assert_held(q);
449 445
450 if (test_bit(flag, &q->queue_flags)) { 446 if (test_bit(flag, &q->queue_flags)) {
451 __clear_bit(flag, &q->queue_flags); 447 __clear_bit(flag, &q->queue_flags);
@@ -458,7 +454,7 @@ static inline int queue_flag_test_and_clear(unsigned int flag,
458static inline int queue_flag_test_and_set(unsigned int flag, 454static inline int queue_flag_test_and_set(unsigned int flag,
459 struct request_queue *q) 455 struct request_queue *q)
460{ 456{
461 WARN_ON_ONCE(!queue_is_locked(q)); 457 queue_lockdep_assert_held(q);
462 458
463 if (!test_bit(flag, &q->queue_flags)) { 459 if (!test_bit(flag, &q->queue_flags)) {
464 __set_bit(flag, &q->queue_flags); 460 __set_bit(flag, &q->queue_flags);
@@ -470,7 +466,7 @@ static inline int queue_flag_test_and_set(unsigned int flag,
470 466
471static inline void queue_flag_set(unsigned int flag, struct request_queue *q) 467static inline void queue_flag_set(unsigned int flag, struct request_queue *q)
472{ 468{
473 WARN_ON_ONCE(!queue_is_locked(q)); 469 queue_lockdep_assert_held(q);
474 __set_bit(flag, &q->queue_flags); 470 __set_bit(flag, &q->queue_flags);
475} 471}
476 472
@@ -487,7 +483,7 @@ static inline int queue_in_flight(struct request_queue *q)
487 483
488static inline void queue_flag_clear(unsigned int flag, struct request_queue *q) 484static inline void queue_flag_clear(unsigned int flag, struct request_queue *q)
489{ 485{
490 WARN_ON_ONCE(!queue_is_locked(q)); 486 queue_lockdep_assert_held(q);
491 __clear_bit(flag, &q->queue_flags); 487 __clear_bit(flag, &q->queue_flags);
492} 488}
493 489
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
index 676f967390ae..f9a2e5e67a54 100644
--- a/include/linux/dmaengine.h
+++ b/include/linux/dmaengine.h
@@ -974,6 +974,7 @@ int dma_async_device_register(struct dma_device *device);
974void dma_async_device_unregister(struct dma_device *device); 974void dma_async_device_unregister(struct dma_device *device);
975void dma_run_dependencies(struct dma_async_tx_descriptor *tx); 975void dma_run_dependencies(struct dma_async_tx_descriptor *tx);
976struct dma_chan *dma_find_channel(enum dma_transaction_type tx_type); 976struct dma_chan *dma_find_channel(enum dma_transaction_type tx_type);
977struct dma_chan *net_dma_find_channel(void);
977#define dma_request_channel(mask, x, y) __dma_request_channel(&(mask), x, y) 978#define dma_request_channel(mask, x, y) __dma_request_channel(&(mask), x, y)
978 979
979/* --- Helper iov-locking functions --- */ 980/* --- Helper iov-locking functions --- */
diff --git a/include/linux/irq.h b/include/linux/irq.h
index bff29c58da23..7810406f3d80 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -263,6 +263,11 @@ static inline void irqd_clr_chained_irq_inprogress(struct irq_data *d)
263 d->state_use_accessors &= ~IRQD_IRQ_INPROGRESS; 263 d->state_use_accessors &= ~IRQD_IRQ_INPROGRESS;
264} 264}
265 265
266static inline irq_hw_number_t irqd_to_hwirq(struct irq_data *d)
267{
268 return d->hwirq;
269}
270
266/** 271/**
267 * struct irq_chip - hardware interrupt chip descriptor 272 * struct irq_chip - hardware interrupt chip descriptor
268 * 273 *
diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h
index ead4a4215797..c65740d76e66 100644
--- a/include/linux/irqdomain.h
+++ b/include/linux/irqdomain.h
@@ -42,12 +42,6 @@ struct of_device_id;
42/* Number of irqs reserved for a legacy isa controller */ 42/* Number of irqs reserved for a legacy isa controller */
43#define NUM_ISA_INTERRUPTS 16 43#define NUM_ISA_INTERRUPTS 16
44 44
45/* This type is the placeholder for a hardware interrupt number. It has to
46 * be big enough to enclose whatever representation is used by a given
47 * platform.
48 */
49typedef unsigned long irq_hw_number_t;
50
51/** 45/**
52 * struct irq_domain_ops - Methods for irq_domain objects 46 * struct irq_domain_ops - Methods for irq_domain objects
53 * @match: Match an interrupt controller device node to a host, returns 47 * @match: Match an interrupt controller device node to a host, returns
@@ -104,6 +98,9 @@ struct irq_domain {
104 unsigned int size; 98 unsigned int size;
105 unsigned int *revmap; 99 unsigned int *revmap;
106 } linear; 100 } linear;
101 struct {
102 unsigned int max_irq;
103 } nomap;
107 struct radix_tree_root tree; 104 struct radix_tree_root tree;
108 } revmap_data; 105 } revmap_data;
109 const struct irq_domain_ops *ops; 106 const struct irq_domain_ops *ops;
@@ -126,6 +123,7 @@ struct irq_domain *irq_domain_add_linear(struct device_node *of_node,
126 const struct irq_domain_ops *ops, 123 const struct irq_domain_ops *ops,
127 void *host_data); 124 void *host_data);
128struct irq_domain *irq_domain_add_nomap(struct device_node *of_node, 125struct irq_domain *irq_domain_add_nomap(struct device_node *of_node,
126 unsigned int max_irq,
129 const struct irq_domain_ops *ops, 127 const struct irq_domain_ops *ops,
130 void *host_data); 128 void *host_data);
131struct irq_domain *irq_domain_add_tree(struct device_node *of_node, 129struct irq_domain *irq_domain_add_tree(struct device_node *of_node,
@@ -134,7 +132,6 @@ struct irq_domain *irq_domain_add_tree(struct device_node *of_node,
134 132
135extern struct irq_domain *irq_find_host(struct device_node *node); 133extern struct irq_domain *irq_find_host(struct device_node *node);
136extern void irq_set_default_host(struct irq_domain *host); 134extern void irq_set_default_host(struct irq_domain *host);
137extern void irq_set_virq_count(unsigned int count);
138 135
139static inline struct irq_domain *irq_domain_add_legacy_isa( 136static inline struct irq_domain *irq_domain_add_legacy_isa(
140 struct device_node *of_node, 137 struct device_node *of_node,
@@ -146,7 +143,6 @@ static inline struct irq_domain *irq_domain_add_legacy_isa(
146} 143}
147extern struct irq_domain *irq_find_host(struct device_node *node); 144extern struct irq_domain *irq_find_host(struct device_node *node);
148extern void irq_set_default_host(struct irq_domain *host); 145extern void irq_set_default_host(struct irq_domain *host);
149extern void irq_set_virq_count(unsigned int count);
150 146
151 147
152extern unsigned int irq_create_mapping(struct irq_domain *host, 148extern unsigned int irq_create_mapping(struct irq_domain *host,
diff --git a/include/linux/kconfig.h b/include/linux/kconfig.h
index 067eda0e4b32..be342b94c640 100644
--- a/include/linux/kconfig.h
+++ b/include/linux/kconfig.h
@@ -4,29 +4,43 @@
4#include <generated/autoconf.h> 4#include <generated/autoconf.h>
5 5
6/* 6/*
7 * Helper macros to use CONFIG_ options in C expressions. Note that 7 * Helper macros to use CONFIG_ options in C/CPP expressions. Note that
8 * these only work with boolean and tristate options. 8 * these only work with boolean and tristate options.
9 */ 9 */
10 10
11/* 11/*
12 * Getting something that works in C and CPP for an arg that may or may
13 * not be defined is tricky. Here, if we have "#define CONFIG_BOOGER 1"
14 * we match on the placeholder define, insert the "0," for arg1 and generate
15 * the triplet (0, 1, 0). Then the last step cherry picks the 2nd arg (a one).
16 * When CONFIG_BOOGER is not defined, we generate a (... 1, 0) pair, and when
17 * the last step cherry picks the 2nd arg, we get a zero.
18 */
19#define __ARG_PLACEHOLDER_1 0,
20#define config_enabled(cfg) _config_enabled(cfg)
21#define _config_enabled(value) __config_enabled(__ARG_PLACEHOLDER_##value)
22#define __config_enabled(arg1_or_junk) ___config_enabled(arg1_or_junk 1, 0)
23#define ___config_enabled(__ignored, val, ...) val
24
25/*
12 * IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm', 26 * IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',
13 * 0 otherwise. 27 * 0 otherwise.
14 * 28 *
15 */ 29 */
16#define IS_ENABLED(option) \ 30#define IS_ENABLED(option) \
17 (__enabled_ ## option || __enabled_ ## option ## _MODULE) 31 (config_enabled(option) || config_enabled(option##_MODULE))
18 32
19/* 33/*
20 * IS_BUILTIN(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y', 0 34 * IS_BUILTIN(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y', 0
21 * otherwise. For boolean options, this is equivalent to 35 * otherwise. For boolean options, this is equivalent to
22 * IS_ENABLED(CONFIG_FOO). 36 * IS_ENABLED(CONFIG_FOO).
23 */ 37 */
24#define IS_BUILTIN(option) __enabled_ ## option 38#define IS_BUILTIN(option) config_enabled(option)
25 39
26/* 40/*
27 * IS_MODULE(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'm', 0 41 * IS_MODULE(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'm', 0
28 * otherwise. 42 * otherwise.
29 */ 43 */
30#define IS_MODULE(option) __enabled_ ## option ## _MODULE 44#define IS_MODULE(option) config_enabled(option##_MODULE)
31 45
32#endif /* __LINUX_KCONFIG_H */ 46#endif /* __LINUX_KCONFIG_H */
diff --git a/include/linux/netfilter_ipv6/ip6_tables.h b/include/linux/netfilter_ipv6/ip6_tables.h
index f549adccc94c..1bc898b14a80 100644
--- a/include/linux/netfilter_ipv6/ip6_tables.h
+++ b/include/linux/netfilter_ipv6/ip6_tables.h
@@ -287,7 +287,17 @@ extern unsigned int ip6t_do_table(struct sk_buff *skb,
287 struct xt_table *table); 287 struct xt_table *table);
288 288
289/* Check for an extension */ 289/* Check for an extension */
290extern int ip6t_ext_hdr(u8 nexthdr); 290static inline int
291ip6t_ext_hdr(u8 nexthdr)
292{ return (nexthdr == IPPROTO_HOPOPTS) ||
293 (nexthdr == IPPROTO_ROUTING) ||
294 (nexthdr == IPPROTO_FRAGMENT) ||
295 (nexthdr == IPPROTO_ESP) ||
296 (nexthdr == IPPROTO_AH) ||
297 (nexthdr == IPPROTO_NONE) ||
298 (nexthdr == IPPROTO_DSTOPTS);
299}
300
291/* find specified header and get offset to it */ 301/* find specified header and get offset to it */
292extern int ipv6_find_hdr(const struct sk_buff *skb, unsigned int *offset, 302extern int ipv6_find_hdr(const struct sk_buff *skb, unsigned int *offset,
293 int target, unsigned short *fragoff); 303 int target, unsigned short *fragoff);
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index f51bf2e70c69..2db407a40051 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -357,7 +357,7 @@ struct uart_port {
357#define UPF_CONS_FLOW ((__force upf_t) (1 << 23)) 357#define UPF_CONS_FLOW ((__force upf_t) (1 << 23))
358#define UPF_SHARE_IRQ ((__force upf_t) (1 << 24)) 358#define UPF_SHARE_IRQ ((__force upf_t) (1 << 24))
359#define UPF_EXAR_EFR ((__force upf_t) (1 << 25)) 359#define UPF_EXAR_EFR ((__force upf_t) (1 << 25))
360#define UPF_IIR_ONCE ((__force upf_t) (1 << 26)) 360#define UPF_BUG_THRE ((__force upf_t) (1 << 26))
361/* The exact UART type is known and should not be probed. */ 361/* The exact UART type is known and should not be probed. */
362#define UPF_FIXED_TYPE ((__force upf_t) (1 << 27)) 362#define UPF_FIXED_TYPE ((__force upf_t) (1 << 27))
363#define UPF_BOOT_AUTOCONF ((__force upf_t) (1 << 28)) 363#define UPF_BOOT_AUTOCONF ((__force upf_t) (1 << 28))
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 33370271b8b2..70a3f8d49118 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -481,6 +481,7 @@ struct sk_buff {
481 union { 481 union {
482 __u32 mark; 482 __u32 mark;
483 __u32 dropcount; 483 __u32 dropcount;
484 __u32 avail_size;
484 }; 485 };
485 486
486 sk_buff_data_t transport_header; 487 sk_buff_data_t transport_header;
@@ -1366,6 +1367,18 @@ static inline int skb_tailroom(const struct sk_buff *skb)
1366} 1367}
1367 1368
1368/** 1369/**
1370 * skb_availroom - bytes at buffer end
1371 * @skb: buffer to check
1372 *
1373 * Return the number of bytes of free space at the tail of an sk_buff
1374 * allocated by sk_stream_alloc()
1375 */
1376static inline int skb_availroom(const struct sk_buff *skb)
1377{
1378 return skb_is_nonlinear(skb) ? 0 : skb->avail_size - skb->len;
1379}
1380
1381/**
1369 * skb_reserve - adjust headroom 1382 * skb_reserve - adjust headroom
1370 * @skb: buffer to alter 1383 * @skb: buffer to alter
1371 * @len: bytes to move 1384 * @len: bytes to move
diff --git a/include/linux/stddef.h b/include/linux/stddef.h
index 6a40c76bdcf1..1747b6787b9e 100644
--- a/include/linux/stddef.h
+++ b/include/linux/stddef.h
@@ -3,14 +3,10 @@
3 3
4#include <linux/compiler.h> 4#include <linux/compiler.h>
5 5
6#ifdef __KERNEL__
7
6#undef NULL 8#undef NULL
7#if defined(__cplusplus)
8#define NULL 0
9#else
10#define NULL ((void *)0) 9#define NULL ((void *)0)
11#endif
12
13#ifdef __KERNEL__
14 10
15enum { 11enum {
16 false = 0, 12 false = 0,
diff --git a/include/linux/types.h b/include/linux/types.h
index e5fa50345516..7f480db60231 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -210,6 +210,12 @@ typedef u32 phys_addr_t;
210 210
211typedef phys_addr_t resource_size_t; 211typedef phys_addr_t resource_size_t;
212 212
213/*
214 * This type is the placeholder for a hardware interrupt number. It has to be
215 * big enough to enclose whatever representation is used by a given platform.
216 */
217typedef unsigned long irq_hw_number_t;
218
213typedef struct { 219typedef struct {
214 int counter; 220 int counter;
215} atomic_t; 221} atomic_t;
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h
index fbb666b1b670..474283888233 100644
--- a/include/linux/usb/serial.h
+++ b/include/linux/usb/serial.h
@@ -28,13 +28,6 @@
28/* parity check flag */ 28/* parity check flag */
29#define RELEVANT_IFLAG(iflag) (iflag & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK)) 29#define RELEVANT_IFLAG(iflag) (iflag & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK))
30 30
31enum port_dev_state {
32 PORT_UNREGISTERED,
33 PORT_REGISTERING,
34 PORT_REGISTERED,
35 PORT_UNREGISTERING,
36};
37
38/* USB serial flags */ 31/* USB serial flags */
39#define USB_SERIAL_WRITE_BUSY 0 32#define USB_SERIAL_WRITE_BUSY 0
40 33
@@ -124,7 +117,6 @@ struct usb_serial_port {
124 char throttle_req; 117 char throttle_req;
125 unsigned long sysrq; /* sysrq timeout */ 118 unsigned long sysrq; /* sysrq timeout */
126 struct device dev; 119 struct device dev;
127 enum port_dev_state dev_state;
128}; 120};
129#define to_usb_serial_port(d) container_of(d, struct usb_serial_port, dev) 121#define to_usb_serial_port(d) container_of(d, struct usb_serial_port, dev)
130 122
diff --git a/include/linux/vgaarb.h b/include/linux/vgaarb.h
index 9c3120dca294..b572f80bdfd5 100644
--- a/include/linux/vgaarb.h
+++ b/include/linux/vgaarb.h
@@ -47,6 +47,8 @@
47 */ 47 */
48#define VGA_DEFAULT_DEVICE (NULL) 48#define VGA_DEFAULT_DEVICE (NULL)
49 49
50struct pci_dev;
51
50/* For use by clients */ 52/* For use by clients */
51 53
52/** 54/**
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index 344b0f972828..d47e523c9d83 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -92,6 +92,7 @@ enum {
92 HCI_SERVICE_CACHE, 92 HCI_SERVICE_CACHE,
93 HCI_LINK_KEYS, 93 HCI_LINK_KEYS,
94 HCI_DEBUG_KEYS, 94 HCI_DEBUG_KEYS,
95 HCI_UNREGISTER,
95 96
96 HCI_LE_SCAN, 97 HCI_LE_SCAN,
97 HCI_SSP_ENABLED, 98 HCI_SSP_ENABLED,
@@ -1327,8 +1328,8 @@ struct sockaddr_hci {
1327#define HCI_DEV_NONE 0xffff 1328#define HCI_DEV_NONE 0xffff
1328 1329
1329#define HCI_CHANNEL_RAW 0 1330#define HCI_CHANNEL_RAW 0
1330#define HCI_CHANNEL_CONTROL 1
1331#define HCI_CHANNEL_MONITOR 2 1331#define HCI_CHANNEL_MONITOR 2
1332#define HCI_CHANNEL_CONTROL 3
1332 1333
1333struct hci_filter { 1334struct hci_filter {
1334 unsigned long type_mask; 1335 unsigned long type_mask;
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index daefaac51131..6822d2595aff 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -427,7 +427,7 @@ enum {
427static inline bool hci_conn_ssp_enabled(struct hci_conn *conn) 427static inline bool hci_conn_ssp_enabled(struct hci_conn *conn)
428{ 428{
429 struct hci_dev *hdev = conn->hdev; 429 struct hci_dev *hdev = conn->hdev;
430 return (test_bit(HCI_SSP_ENABLED, &hdev->flags) && 430 return (test_bit(HCI_SSP_ENABLED, &hdev->dev_flags) &&
431 test_bit(HCI_CONN_SSP_ENABLED, &conn->flags)); 431 test_bit(HCI_CONN_SSP_ENABLED, &conn->flags));
432} 432}
433 433
@@ -907,11 +907,13 @@ static inline void hci_role_switch_cfm(struct hci_conn *conn, __u8 status,
907 907
908static inline bool eir_has_data_type(u8 *data, size_t data_len, u8 type) 908static inline bool eir_has_data_type(u8 *data, size_t data_len, u8 type)
909{ 909{
910 u8 field_len; 910 size_t parsed = 0;
911 size_t parsed;
912 911
913 for (parsed = 0; parsed < data_len - 1; parsed += field_len) { 912 if (data_len < 2)
914 field_len = data[0]; 913 return false;
914
915 while (parsed < data_len - 1) {
916 u8 field_len = data[0];
915 917
916 if (field_len == 0) 918 if (field_len == 0)
917 break; 919 break;
diff --git a/include/net/bluetooth/mgmt.h b/include/net/bluetooth/mgmt.h
index ffc1377e092e..ebfd91fc20f8 100644
--- a/include/net/bluetooth/mgmt.h
+++ b/include/net/bluetooth/mgmt.h
@@ -117,7 +117,7 @@ struct mgmt_mode {
117#define MGMT_OP_SET_DISCOVERABLE 0x0006 117#define MGMT_OP_SET_DISCOVERABLE 0x0006
118struct mgmt_cp_set_discoverable { 118struct mgmt_cp_set_discoverable {
119 __u8 val; 119 __u8 val;
120 __u16 timeout; 120 __le16 timeout;
121} __packed; 121} __packed;
122#define MGMT_SET_DISCOVERABLE_SIZE 3 122#define MGMT_SET_DISCOVERABLE_SIZE 3
123 123
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 87d203ff7a8a..9210bdc7bd8d 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -1327,7 +1327,7 @@ static inline struct ieee80211_rate *
1327ieee80211_get_tx_rate(const struct ieee80211_hw *hw, 1327ieee80211_get_tx_rate(const struct ieee80211_hw *hw,
1328 const struct ieee80211_tx_info *c) 1328 const struct ieee80211_tx_info *c)
1329{ 1329{
1330 if (WARN_ON(c->control.rates[0].idx < 0)) 1330 if (WARN_ON_ONCE(c->control.rates[0].idx < 0))
1331 return NULL; 1331 return NULL;
1332 return &hw->wiphy->bands[c->band]->bitrates[c->control.rates[0].idx]; 1332 return &hw->wiphy->bands[c->band]->bitrates[c->control.rates[0].idx];
1333} 1333}
diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h
index 377df4a28512..1e1198546c72 100644
--- a/include/scsi/scsi_cmnd.h
+++ b/include/scsi/scsi_cmnd.h
@@ -134,6 +134,9 @@ struct scsi_cmnd {
134 134
135static inline struct scsi_driver *scsi_cmd_to_driver(struct scsi_cmnd *cmd) 135static inline struct scsi_driver *scsi_cmd_to_driver(struct scsi_cmnd *cmd)
136{ 136{
137 if (!cmd->request->rq_disk)
138 return NULL;
139
137 return *(struct scsi_driver **)cmd->request->rq_disk->private_data; 140 return *(struct scsi_driver **)cmd->request->rq_disk->private_data;
138} 141}
139 142
diff --git a/include/sound/core.h b/include/sound/core.h
index b6e0f57d451d..bc056687f647 100644
--- a/include/sound/core.h
+++ b/include/sound/core.h
@@ -325,6 +325,13 @@ void release_and_free_resource(struct resource *res);
325 325
326/* --- */ 326/* --- */
327 327
328/* sound printk debug levels */
329enum {
330 SND_PR_ALWAYS,
331 SND_PR_DEBUG,
332 SND_PR_VERBOSE,
333};
334
328#if defined(CONFIG_SND_DEBUG) || defined(CONFIG_SND_VERBOSE_PRINTK) 335#if defined(CONFIG_SND_DEBUG) || defined(CONFIG_SND_VERBOSE_PRINTK)
329__printf(4, 5) 336__printf(4, 5)
330void __snd_printk(unsigned int level, const char *file, int line, 337void __snd_printk(unsigned int level, const char *file, int line,
@@ -354,6 +361,8 @@ void __snd_printk(unsigned int level, const char *file, int line,
354 */ 361 */
355#define snd_printd(fmt, args...) \ 362#define snd_printd(fmt, args...) \
356 __snd_printk(1, __FILE__, __LINE__, fmt, ##args) 363 __snd_printk(1, __FILE__, __LINE__, fmt, ##args)
364#define _snd_printd(level, fmt, args...) \
365 __snd_printk(level, __FILE__, __LINE__, fmt, ##args)
357 366
358/** 367/**
359 * snd_BUG - give a BUG warning message and stack trace 368 * snd_BUG - give a BUG warning message and stack trace
@@ -383,6 +392,7 @@ void __snd_printk(unsigned int level, const char *file, int line,
383#else /* !CONFIG_SND_DEBUG */ 392#else /* !CONFIG_SND_DEBUG */
384 393
385#define snd_printd(fmt, args...) do { } while (0) 394#define snd_printd(fmt, args...) do { } while (0)
395#define _snd_printd(level, fmt, args...) do { } while (0)
386#define snd_BUG() do { } while (0) 396#define snd_BUG() do { } while (0)
387static inline int __snd_bug_on(int cond) 397static inline int __snd_bug_on(int cond)
388{ 398{