aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-10-01 15:10:44 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-01 15:10:44 -0400
commit06d2fe153b9b35e57221e35831a26918f462db68 (patch)
treef77cb72dfba7f2a47ceb93e120abd9399a24a1b9 /include
parent3aebd34b1200a902a8662da8845824a02f00772e (diff)
parente0f21e6d52cc245e7d4f7e02ca4b7b6571660ec2 (diff)
Merge tag 'driver-core-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
Pull driver core merge from Greg Kroah-Hartman: "Here is the big driver core update for 3.7-rc1. A number of firmware_class.c updates (as you saw a month or so ago), and some hyper-v updates and some printk fixes as well. All patches that are outside of the drivers/base area have been acked by the respective maintainers, and have all been in the linux-next tree for a while. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>" * tag 'driver-core-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (95 commits) memory: tegra{20,30}-mc: Fix reading incorrect register in mc_readl() device.h: Add missing inline to #ifndef CONFIG_PRINTK dev_vprintk_emit memory: emif: Add ifdef CONFIG_DEBUG_FS guard for emif_debugfs_[init|exit] Documentation: Fixes some translation error in Documentation/zh_CN/gpio.txt Documentation: Remove 3 byte redundant code at the head of the Documentation/zh_CN/arm/booting Documentation: Chinese translation of Documentation/video4linux/omap3isp.txt device and dynamic_debug: Use dev_vprintk_emit and dev_printk_emit dev: Add dev_vprintk_emit and dev_printk_emit netdev_printk/netif_printk: Remove a superfluous logging colon netdev_printk/dynamic_netdev_dbg: Directly call printk_emit dev_dbg/dynamic_debug: Update to use printk_emit, optimize stack driver-core: Shut up dev_dbg_reatelimited() without DEBUG tools/hv: Parse /etc/os-release tools/hv: Check for read/write errors tools/hv: Fix exit() error code tools/hv: Fix file handle leak Tools: hv: Implement the KVP verb - KVP_OP_GET_IP_INFO Tools: hv: Rename the function kvp_get_ip_address() Tools: hv: Implement the KVP verb - KVP_OP_SET_IP_INFO Tools: hv: Add an example script to configure an interface ...
Diffstat (limited to 'include')
-rw-r--r--include/linux/device.h85
-rw-r--r--include/linux/extcon.h18
-rw-r--r--include/linux/extcon/extcon-adc-jack.h71
-rw-r--r--include/linux/firmware.h15
-rw-r--r--include/linux/hyperv.h101
-rw-r--r--include/linux/netdevice.h3
-rw-r--r--include/linux/platform_device.h4
-rw-r--r--include/linux/pm.h5
8 files changed, 251 insertions, 51 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index 52a5f15a2223..af92883bb4a6 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -536,6 +536,10 @@ extern void *__devres_alloc(dr_release_t release, size_t size, gfp_t gfp,
536#else 536#else
537extern void *devres_alloc(dr_release_t release, size_t size, gfp_t gfp); 537extern void *devres_alloc(dr_release_t release, size_t size, gfp_t gfp);
538#endif 538#endif
539extern void devres_for_each_res(struct device *dev, dr_release_t release,
540 dr_match_t match, void *match_data,
541 void (*fn)(struct device *, void *, void *),
542 void *data);
539extern void devres_free(void *res); 543extern void devres_free(void *res);
540extern void devres_add(struct device *dev, void *res); 544extern void devres_add(struct device *dev, void *res);
541extern void *devres_find(struct device *dev, dr_release_t release, 545extern void *devres_find(struct device *dev, dr_release_t release,
@@ -891,12 +895,15 @@ extern const char *dev_driver_string(const struct device *dev);
891 895
892#ifdef CONFIG_PRINTK 896#ifdef CONFIG_PRINTK
893 897
894extern int __dev_printk(const char *level, const struct device *dev, 898extern __printf(3, 0)
895 struct va_format *vaf); 899int dev_vprintk_emit(int level, const struct device *dev,
900 const char *fmt, va_list args);
901extern __printf(3, 4)
902int dev_printk_emit(int level, const struct device *dev, const char *fmt, ...);
903
896extern __printf(3, 4) 904extern __printf(3, 4)
897int dev_printk(const char *level, const struct device *dev, 905int dev_printk(const char *level, const struct device *dev,
898 const char *fmt, ...) 906 const char *fmt, ...);
899 ;
900extern __printf(2, 3) 907extern __printf(2, 3)
901int dev_emerg(const struct device *dev, const char *fmt, ...); 908int dev_emerg(const struct device *dev, const char *fmt, ...);
902extern __printf(2, 3) 909extern __printf(2, 3)
@@ -914,6 +921,14 @@ int _dev_info(const struct device *dev, const char *fmt, ...);
914 921
915#else 922#else
916 923
924static inline __printf(3, 0)
925int dev_vprintk_emit(int level, const struct device *dev,
926 const char *fmt, va_list args)
927{ return 0; }
928static inline __printf(3, 4)
929int dev_printk_emit(int level, const struct device *dev, const char *fmt, ...)
930{ return 0; }
931
917static inline int __dev_printk(const char *level, const struct device *dev, 932static inline int __dev_printk(const char *level, const struct device *dev,
918 struct va_format *vaf) 933 struct va_format *vaf)
919{ return 0; } 934{ return 0; }
@@ -946,6 +961,32 @@ int _dev_info(const struct device *dev, const char *fmt, ...)
946 961
947#endif 962#endif
948 963
964/*
965 * Stupid hackaround for existing uses of non-printk uses dev_info
966 *
967 * Note that the definition of dev_info below is actually _dev_info
968 * and a macro is used to avoid redefining dev_info
969 */
970
971#define dev_info(dev, fmt, arg...) _dev_info(dev, fmt, ##arg)
972
973#if defined(CONFIG_DYNAMIC_DEBUG)
974#define dev_dbg(dev, format, ...) \
975do { \
976 dynamic_dev_dbg(dev, format, ##__VA_ARGS__); \
977} while (0)
978#elif defined(DEBUG)
979#define dev_dbg(dev, format, arg...) \
980 dev_printk(KERN_DEBUG, dev, format, ##arg)
981#else
982#define dev_dbg(dev, format, arg...) \
983({ \
984 if (0) \
985 dev_printk(KERN_DEBUG, dev, format, ##arg); \
986 0; \
987})
988#endif
989
949#define dev_level_ratelimited(dev_level, dev, fmt, ...) \ 990#define dev_level_ratelimited(dev_level, dev, fmt, ...) \
950do { \ 991do { \
951 static DEFINE_RATELIMIT_STATE(_rs, \ 992 static DEFINE_RATELIMIT_STATE(_rs, \
@@ -969,33 +1010,21 @@ do { \
969 dev_level_ratelimited(dev_notice, dev, fmt, ##__VA_ARGS__) 1010 dev_level_ratelimited(dev_notice, dev, fmt, ##__VA_ARGS__)
970#define dev_info_ratelimited(dev, fmt, ...) \ 1011#define dev_info_ratelimited(dev, fmt, ...) \
971 dev_level_ratelimited(dev_info, dev, fmt, ##__VA_ARGS__) 1012 dev_level_ratelimited(dev_info, dev, fmt, ##__VA_ARGS__)
1013#if defined(CONFIG_DYNAMIC_DEBUG) || defined(DEBUG)
972#define dev_dbg_ratelimited(dev, fmt, ...) \ 1014#define dev_dbg_ratelimited(dev, fmt, ...) \
973 dev_level_ratelimited(dev_dbg, dev, fmt, ##__VA_ARGS__) 1015do { \
974 1016 static DEFINE_RATELIMIT_STATE(_rs, \
975/* 1017 DEFAULT_RATELIMIT_INTERVAL, \
976 * Stupid hackaround for existing uses of non-printk uses dev_info 1018 DEFAULT_RATELIMIT_BURST); \
977 * 1019 DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
978 * Note that the definition of dev_info below is actually _dev_info 1020 if (unlikely(descriptor.flags & _DPRINTK_FLAGS_PRINT) && \
979 * and a macro is used to avoid redefining dev_info 1021 __ratelimit(&_rs)) \
980 */ 1022 __dynamic_pr_debug(&descriptor, pr_fmt(fmt), \
981 1023 ##__VA_ARGS__); \
982#define dev_info(dev, fmt, arg...) _dev_info(dev, fmt, ##arg)
983
984#if defined(CONFIG_DYNAMIC_DEBUG)
985#define dev_dbg(dev, format, ...) \
986do { \
987 dynamic_dev_dbg(dev, format, ##__VA_ARGS__); \
988} while (0) 1024} while (0)
989#elif defined(DEBUG)
990#define dev_dbg(dev, format, arg...) \
991 dev_printk(KERN_DEBUG, dev, format, ##arg)
992#else 1025#else
993#define dev_dbg(dev, format, arg...) \ 1026#define dev_dbg_ratelimited(dev, fmt, ...) \
994({ \ 1027 no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
995 if (0) \
996 dev_printk(KERN_DEBUG, dev, format, ##arg); \
997 0; \
998})
999#endif 1028#endif
1000 1029
1001#ifdef VERBOSE_DEBUG 1030#ifdef VERBOSE_DEBUG
diff --git a/include/linux/extcon.h b/include/linux/extcon.h
index cdd401477656..7443a560c9d0 100644
--- a/include/linux/extcon.h
+++ b/include/linux/extcon.h
@@ -30,19 +30,19 @@
30 30
31/* 31/*
32 * The standard cable name is to help support general notifier 32 * The standard cable name is to help support general notifier
33 * and notifee device drivers to share the common names. 33 * and notifiee device drivers to share the common names.
34 * Please use standard cable names unless your notifier device has 34 * Please use standard cable names unless your notifier device has
35 * a very unique and abnormal cable or 35 * a very unique and abnormal cable or
36 * the cable type is supposed to be used with only one unique 36 * the cable type is supposed to be used with only one unique
37 * pair of notifier/notifee devices. 37 * pair of notifier/notifiee devices.
38 * 38 *
39 * Please add any other "standard" cables used with extcon dev. 39 * Please add any other "standard" cables used with extcon dev.
40 * 40 *
41 * You may add a dot and number to specify version or specification 41 * You may add a dot and number to specify version or specification
42 * of the specific cable if it is required. (e.g., "Fast-charger.18" 42 * of the specific cable if it is required. (e.g., "Fast-charger.18"
43 * and "Fast-charger.10" for 1.8A and 1.0A chargers) 43 * and "Fast-charger.10" for 1.8A and 1.0A chargers)
44 * However, the notifee and notifier should be able to handle such 44 * However, the notifiee and notifier should be able to handle such
45 * string and if the notifee can negotiate the protocol or idenify, 45 * string and if the notifiee can negotiate the protocol or identify,
46 * you don't need such convention. This convention is helpful when 46 * you don't need such convention. This convention is helpful when
47 * notifier can distinguish but notifiee cannot. 47 * notifier can distinguish but notifiee cannot.
48 */ 48 */
@@ -76,7 +76,7 @@ struct extcon_cable;
76 * struct extcon_dev - An extcon device represents one external connector. 76 * struct extcon_dev - An extcon device represents one external connector.
77 * @name The name of this extcon device. Parent device name is used 77 * @name The name of this extcon device. Parent device name is used
78 * if NULL. 78 * if NULL.
79 * @supported_cable Array of supported cable name ending with NULL. 79 * @supported_cable Array of supported cable names ending with NULL.
80 * If supported_cable is NULL, cable name related APIs 80 * If supported_cable is NULL, cable name related APIs
81 * are disabled. 81 * are disabled.
82 * @mutually_exclusive Array of mutually exclusive set of cables that cannot 82 * @mutually_exclusive Array of mutually exclusive set of cables that cannot
@@ -95,7 +95,7 @@ struct extcon_cable;
95 * @state Attach/detach state of this extcon. Do not provide at 95 * @state Attach/detach state of this extcon. Do not provide at
96 * register-time 96 * register-time
97 * @nh Notifier for the state change events from this extcon 97 * @nh Notifier for the state change events from this extcon
98 * @entry To support list of extcon devices so that uses can search 98 * @entry To support list of extcon devices so that users can search
99 * for extcon devices based on the extcon name. 99 * for extcon devices based on the extcon name.
100 * @lock 100 * @lock
101 * @max_supported Internal value to store the number of cables. 101 * @max_supported Internal value to store the number of cables.
@@ -199,7 +199,7 @@ extern int extcon_update_state(struct extcon_dev *edev, u32 mask, u32 state);
199/* 199/*
200 * get/set_cable_state access each bit of the 32b encoded state value. 200 * get/set_cable_state access each bit of the 32b encoded state value.
201 * They are used to access the status of each cable based on the cable_name 201 * They are used to access the status of each cable based on the cable_name
202 * or cable_index, which is retrived by extcon_find_cable_index 202 * or cable_index, which is retrieved by extcon_find_cable_index
203 */ 203 */
204extern int extcon_find_cable_index(struct extcon_dev *sdev, 204extern int extcon_find_cable_index(struct extcon_dev *sdev,
205 const char *cable_name); 205 const char *cable_name);
@@ -226,9 +226,9 @@ extern int extcon_unregister_interest(struct extcon_specific_cable_nb *nb);
226 226
227/* 227/*
228 * Following APIs are to monitor every action of a notifier. 228 * Following APIs are to monitor every action of a notifier.
229 * Registerer gets notified for every external port of a connection device. 229 * Registrar gets notified for every external port of a connection device.
230 * Probably this could be used to debug an action of notifier; however, 230 * Probably this could be used to debug an action of notifier; however,
231 * we do not recommend to use this at normal 'notifiee' device drivers who 231 * we do not recommend to use this for normal 'notifiee' device drivers who
232 * want to be notified by a specific external port of the notifier. 232 * want to be notified by a specific external port of the notifier.
233 */ 233 */
234extern int extcon_register_notifier(struct extcon_dev *edev, 234extern int extcon_register_notifier(struct extcon_dev *edev,
diff --git a/include/linux/extcon/extcon-adc-jack.h b/include/linux/extcon/extcon-adc-jack.h
new file mode 100644
index 000000000000..20e9eef25d4c
--- /dev/null
+++ b/include/linux/extcon/extcon-adc-jack.h
@@ -0,0 +1,71 @@
1/*
2 * include/linux/extcon/extcon-adc-jack.h
3 *
4 * Analog Jack extcon driver with ADC-based detection capability.
5 *
6 * Copyright (C) 2012 Samsung Electronics
7 * MyungJoo Ham <myungjoo.ham@samsung.com>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 *
13 */
14
15#ifndef _EXTCON_ADC_JACK_H_
16#define _EXTCON_ADC_JACK_H_ __FILE__
17
18#include <linux/module.h>
19#include <linux/extcon.h>
20
21/**
22 * struct adc_jack_cond - condition to use an extcon state
23 * @state - the corresponding extcon state (if 0, this struct denotes
24 * the last adc_jack_cond element among the array)
25 * @min_adc - min adc value for this condition
26 * @max_adc - max adc value for this condition
27 *
28 * For example, if { .state = 0x3, .min_adc = 100, .max_adc = 200}, it means
29 * that if ADC value is between (inclusive) 100 and 200, than the cable 0 and
30 * 1 are attached (1<<0 | 1<<1 == 0x3)
31 *
32 * Note that you don't need to describe condition for "no cable attached"
33 * because when no adc_jack_cond is met, state = 0 is automatically chosen.
34 */
35struct adc_jack_cond {
36 u32 state; /* extcon state value. 0 if invalid */
37 u32 min_adc;
38 u32 max_adc;
39};
40
41/**
42 * struct adc_jack_pdata - platform data for adc jack device.
43 * @name - name of the extcon device. If null, "adc-jack" is used.
44 * @consumer_channel - Unique name to identify the channel on the consumer
45 * side. This typically describes the channels used within
46 * the consumer. E.g. 'battery_voltage'
47 * @cable_names - array of cable names ending with null.
48 * @adc_contitions - array of struct adc_jack_cond conditions ending
49 * with .state = 0 entry. This describes how to decode
50 * adc values into extcon state.
51 * @irq_flags - irq flags used for the @irq
52 * @handling_delay_ms - in some devices, we need to read ADC value some
53 * milli-seconds after the interrupt occurs. You may
54 * describe such delays with @handling_delay_ms, which
55 * is rounded-off by jiffies.
56 */
57struct adc_jack_pdata {
58 const char *name;
59 const char *consumer_channel;
60 /*
61 * The last entry should be NULL
62 */
63 const char **cable_names;
64 /* The last entry's state should be 0 */
65 struct adc_jack_cond *adc_conditions;
66
67 unsigned long irq_flags;
68 unsigned long handling_delay_ms; /* in ms */
69};
70
71#endif /* _EXTCON_ADC_JACK_H */
diff --git a/include/linux/firmware.h b/include/linux/firmware.h
index 1e7c01189fa6..e4279fedb93a 100644
--- a/include/linux/firmware.h
+++ b/include/linux/firmware.h
@@ -12,6 +12,9 @@ struct firmware {
12 size_t size; 12 size_t size;
13 const u8 *data; 13 const u8 *data;
14 struct page **pages; 14 struct page **pages;
15
16 /* firmware loader private fields */
17 void *priv;
15}; 18};
16 19
17struct module; 20struct module;
@@ -44,6 +47,8 @@ int request_firmware_nowait(
44 void (*cont)(const struct firmware *fw, void *context)); 47 void (*cont)(const struct firmware *fw, void *context));
45 48
46void release_firmware(const struct firmware *fw); 49void release_firmware(const struct firmware *fw);
50int cache_firmware(const char *name);
51int uncache_firmware(const char *name);
47#else 52#else
48static inline int request_firmware(const struct firmware **fw, 53static inline int request_firmware(const struct firmware **fw,
49 const char *name, 54 const char *name,
@@ -62,6 +67,16 @@ static inline int request_firmware_nowait(
62static inline void release_firmware(const struct firmware *fw) 67static inline void release_firmware(const struct firmware *fw)
63{ 68{
64} 69}
70
71static inline int cache_firmware(const char *name)
72{
73 return -ENOENT;
74}
75
76static inline int uncache_firmware(const char *name)
77{
78 return -EINVAL;
79}
65#endif 80#endif
66 81
67#endif 82#endif
diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h
index 68ed7f7e1fc9..e73b852156b1 100644
--- a/include/linux/hyperv.h
+++ b/include/linux/hyperv.h
@@ -122,12 +122,53 @@
122#define REG_U32 4 122#define REG_U32 4
123#define REG_U64 8 123#define REG_U64 8
124 124
125/*
126 * As we look at expanding the KVP functionality to include
127 * IP injection functionality, we need to maintain binary
128 * compatibility with older daemons.
129 *
130 * The KVP opcodes are defined by the host and it was unfortunate
131 * that I chose to treat the registration operation as part of the
132 * KVP operations defined by the host.
133 * Here is the level of compatibility
134 * (between the user level daemon and the kernel KVP driver) that we
135 * will implement:
136 *
137 * An older daemon will always be supported on a newer driver.
138 * A given user level daemon will require a minimal version of the
139 * kernel driver.
140 * If we cannot handle the version differences, we will fail gracefully
141 * (this can happen when we have a user level daemon that is more
142 * advanced than the KVP driver.
143 *
144 * We will use values used in this handshake for determining if we have
145 * workable user level daemon and the kernel driver. We begin by taking the
146 * registration opcode out of the KVP opcode namespace. We will however,
147 * maintain compatibility with the existing user-level daemon code.
148 */
149
150/*
151 * Daemon code not supporting IP injection (legacy daemon).
152 */
153
154#define KVP_OP_REGISTER 4
155
156/*
157 * Daemon code supporting IP injection.
158 * The KVP opcode field is used to communicate the
159 * registration information; so define a namespace that
160 * will be distinct from the host defined KVP opcode.
161 */
162
163#define KVP_OP_REGISTER1 100
164
125enum hv_kvp_exchg_op { 165enum hv_kvp_exchg_op {
126 KVP_OP_GET = 0, 166 KVP_OP_GET = 0,
127 KVP_OP_SET, 167 KVP_OP_SET,
128 KVP_OP_DELETE, 168 KVP_OP_DELETE,
129 KVP_OP_ENUMERATE, 169 KVP_OP_ENUMERATE,
130 KVP_OP_REGISTER, 170 KVP_OP_GET_IP_INFO,
171 KVP_OP_SET_IP_INFO,
131 KVP_OP_COUNT /* Number of operations, must be last. */ 172 KVP_OP_COUNT /* Number of operations, must be last. */
132}; 173};
133 174
@@ -140,6 +181,39 @@ enum hv_kvp_exchg_pool {
140 KVP_POOL_COUNT /* Number of pools, must be last. */ 181 KVP_POOL_COUNT /* Number of pools, must be last. */
141}; 182};
142 183
184/*
185 * Some Hyper-V status codes.
186 */
187
188#define HV_S_OK 0x00000000
189#define HV_E_FAIL 0x80004005
190#define HV_S_CONT 0x80070103
191#define HV_ERROR_NOT_SUPPORTED 0x80070032
192#define HV_ERROR_MACHINE_LOCKED 0x800704F7
193#define HV_ERROR_DEVICE_NOT_CONNECTED 0x8007048F
194#define HV_INVALIDARG 0x80070057
195#define HV_GUID_NOTFOUND 0x80041002
196
197#define ADDR_FAMILY_NONE 0x00
198#define ADDR_FAMILY_IPV4 0x01
199#define ADDR_FAMILY_IPV6 0x02
200
201#define MAX_ADAPTER_ID_SIZE 128
202#define MAX_IP_ADDR_SIZE 1024
203#define MAX_GATEWAY_SIZE 512
204
205
206struct hv_kvp_ipaddr_value {
207 __u16 adapter_id[MAX_ADAPTER_ID_SIZE];
208 __u8 addr_family;
209 __u8 dhcp_enabled;
210 __u16 ip_addr[MAX_IP_ADDR_SIZE];
211 __u16 sub_net[MAX_IP_ADDR_SIZE];
212 __u16 gate_way[MAX_GATEWAY_SIZE];
213 __u16 dns_addr[MAX_IP_ADDR_SIZE];
214} __attribute__((packed));
215
216
143struct hv_kvp_hdr { 217struct hv_kvp_hdr {
144 __u8 operation; 218 __u8 operation;
145 __u8 pool; 219 __u8 pool;
@@ -181,16 +255,26 @@ struct hv_kvp_register {
181}; 255};
182 256
183struct hv_kvp_msg { 257struct hv_kvp_msg {
184 struct hv_kvp_hdr kvp_hdr; 258 union {
259 struct hv_kvp_hdr kvp_hdr;
260 int error;
261 };
185 union { 262 union {
186 struct hv_kvp_msg_get kvp_get; 263 struct hv_kvp_msg_get kvp_get;
187 struct hv_kvp_msg_set kvp_set; 264 struct hv_kvp_msg_set kvp_set;
188 struct hv_kvp_msg_delete kvp_delete; 265 struct hv_kvp_msg_delete kvp_delete;
189 struct hv_kvp_msg_enumerate kvp_enum_data; 266 struct hv_kvp_msg_enumerate kvp_enum_data;
267 struct hv_kvp_ipaddr_value kvp_ip_val;
190 struct hv_kvp_register kvp_register; 268 struct hv_kvp_register kvp_register;
191 } body; 269 } body;
192} __attribute__((packed)); 270} __attribute__((packed));
193 271
272struct hv_kvp_ip_msg {
273 __u8 operation;
274 __u8 pool;
275 struct hv_kvp_ipaddr_value kvp_ip_val;
276} __attribute__((packed));
277
194#ifdef __KERNEL__ 278#ifdef __KERNEL__
195#include <linux/scatterlist.h> 279#include <linux/scatterlist.h>
196#include <linux/list.h> 280#include <linux/list.h>
@@ -405,7 +489,7 @@ struct vmtransfer_page_range {
405struct vmtransfer_page_packet_header { 489struct vmtransfer_page_packet_header {
406 struct vmpacket_descriptor d; 490 struct vmpacket_descriptor d;
407 u16 xfer_pageset_id; 491 u16 xfer_pageset_id;
408 bool sender_owns_set; 492 u8 sender_owns_set;
409 u8 reserved; 493 u8 reserved;
410 u32 range_cnt; 494 u32 range_cnt;
411 struct vmtransfer_page_range ranges[1]; 495 struct vmtransfer_page_range ranges[1];
@@ -559,7 +643,7 @@ struct vmbus_channel_query_vmbus_version {
559/* VMBus Version Supported parameters */ 643/* VMBus Version Supported parameters */
560struct vmbus_channel_version_supported { 644struct vmbus_channel_version_supported {
561 struct vmbus_channel_message_header header; 645 struct vmbus_channel_message_header header;
562 bool version_supported; 646 u8 version_supported;
563} __packed; 647} __packed;
564 648
565/* Offer Channel parameters */ 649/* Offer Channel parameters */
@@ -568,7 +652,7 @@ struct vmbus_channel_offer_channel {
568 struct vmbus_channel_offer offer; 652 struct vmbus_channel_offer offer;
569 u32 child_relid; 653 u32 child_relid;
570 u8 monitorid; 654 u8 monitorid;
571 bool monitor_allocated; 655 u8 monitor_allocated;
572} __packed; 656} __packed;
573 657
574/* Rescind Offer parameters */ 658/* Rescind Offer parameters */
@@ -704,7 +788,7 @@ struct vmbus_channel_initiate_contact {
704 788
705struct vmbus_channel_version_response { 789struct vmbus_channel_version_response {
706 struct vmbus_channel_message_header header; 790 struct vmbus_channel_message_header header;
707 bool version_supported; 791 u8 version_supported;
708} __packed; 792} __packed;
709 793
710enum vmbus_channel_state { 794enum vmbus_channel_state {
@@ -977,11 +1061,6 @@ void vmbus_driver_unregister(struct hv_driver *hv_driver);
977#define ICMSGHDRFLAG_REQUEST 2 1061#define ICMSGHDRFLAG_REQUEST 2
978#define ICMSGHDRFLAG_RESPONSE 4 1062#define ICMSGHDRFLAG_RESPONSE 4
979 1063
980#define HV_S_OK 0x00000000
981#define HV_E_FAIL 0x80004005
982#define HV_S_CONT 0x80070103
983#define HV_ERROR_NOT_SUPPORTED 0x80070032
984#define HV_ERROR_MACHINE_LOCKED 0x800704F7
985 1064
986/* 1065/*
987 * While we want to handle util services as regular devices, 1066 * While we want to handle util services as regular devices,
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 59dc05f38247..5f49cc0a107e 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -2720,9 +2720,6 @@ static inline const char *netdev_name(const struct net_device *dev)
2720 return dev->name; 2720 return dev->name;
2721} 2721}
2722 2722
2723extern int __netdev_printk(const char *level, const struct net_device *dev,
2724 struct va_format *vaf);
2725
2726extern __printf(3, 4) 2723extern __printf(3, 4)
2727int netdev_printk(const char *level, const struct net_device *dev, 2724int netdev_printk(const char *level, const struct net_device *dev,
2728 const char *format, ...); 2725 const char *format, ...);
diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h
index 60e9994ef405..5711e9525a2a 100644
--- a/include/linux/platform_device.h
+++ b/include/linux/platform_device.h
@@ -14,11 +14,15 @@
14#include <linux/device.h> 14#include <linux/device.h>
15#include <linux/mod_devicetable.h> 15#include <linux/mod_devicetable.h>
16 16
17#define PLATFORM_DEVID_NONE (-1)
18#define PLATFORM_DEVID_AUTO (-2)
19
17struct mfd_cell; 20struct mfd_cell;
18 21
19struct platform_device { 22struct platform_device {
20 const char * name; 23 const char * name;
21 int id; 24 int id;
25 bool id_auto;
22 struct device dev; 26 struct device dev;
23 u32 num_resources; 27 u32 num_resources;
24 struct resource * resource; 28 struct resource * resource;
diff --git a/include/linux/pm.h b/include/linux/pm.h
index f067e60a3832..88f034a23f2c 100644
--- a/include/linux/pm.h
+++ b/include/linux/pm.h
@@ -638,6 +638,7 @@ extern void __suspend_report_result(const char *function, void *fn, int ret);
638 } while (0) 638 } while (0)
639 639
640extern int device_pm_wait_for_dev(struct device *sub, struct device *dev); 640extern int device_pm_wait_for_dev(struct device *sub, struct device *dev);
641extern void dpm_for_each_dev(void *data, void (*fn)(struct device *, void *));
641 642
642extern int pm_generic_prepare(struct device *dev); 643extern int pm_generic_prepare(struct device *dev);
643extern int pm_generic_suspend_late(struct device *dev); 644extern int pm_generic_suspend_late(struct device *dev);
@@ -677,6 +678,10 @@ static inline int device_pm_wait_for_dev(struct device *a, struct device *b)
677 return 0; 678 return 0;
678} 679}
679 680
681static inline void dpm_for_each_dev(void *data, void (*fn)(struct device *, void *))
682{
683}
684
680#define pm_generic_prepare NULL 685#define pm_generic_prepare NULL
681#define pm_generic_suspend NULL 686#define pm_generic_suspend NULL
682#define pm_generic_resume NULL 687#define pm_generic_resume NULL