diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/Kbuild | 2 | ||||
-rw-r--r-- | include/linux/acpi.h | 339 | ||||
-rw-r--r-- | include/linux/device.h | 12 | ||||
-rw-r--r-- | include/linux/hid.h | 1 | ||||
-rw-r--r-- | include/linux/ide.h | 4 | ||||
-rw-r--r-- | include/linux/irq.h | 4 | ||||
-rw-r--r-- | include/linux/kobject.h | 4 | ||||
-rw-r--r-- | include/linux/module.h | 3 | ||||
-rw-r--r-- | include/linux/msi.h | 5 | ||||
-rw-r--r-- | include/linux/netdevice.h | 5 | ||||
-rw-r--r-- | include/linux/pci.h | 27 | ||||
-rw-r--r-- | include/linux/pci_ids.h | 2 | ||||
-rw-r--r-- | include/linux/serio.h | 5 | ||||
-rw-r--r-- | include/linux/spi/spi.h | 10 | ||||
-rw-r--r-- | include/linux/sysfs.h | 24 | ||||
-rw-r--r-- | include/linux/usb.h | 39 | ||||
-rw-r--r-- | include/linux/usb/Kbuild | 5 | ||||
-rw-r--r-- | include/linux/usb/ch9.h (renamed from include/linux/usb_ch9.h) | 1 | ||||
-rw-r--r-- | include/linux/usb/serial.h | 5 | ||||
-rw-r--r-- | include/linux/usb_gadgetfs.h | 2 | ||||
-rw-r--r-- | include/linux/video_output.h | 42 |
21 files changed, 174 insertions, 367 deletions
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index 157db77a7170..683513e310de 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -11,6 +11,7 @@ header-y += netfilter_arp/ | |||
11 | header-y += netfilter_bridge/ | 11 | header-y += netfilter_bridge/ |
12 | header-y += netfilter_ipv4/ | 12 | header-y += netfilter_ipv4/ |
13 | header-y += netfilter_ipv6/ | 13 | header-y += netfilter_ipv6/ |
14 | header-y += usb/ | ||
14 | 15 | ||
15 | header-y += affs_hardblocks.h | 16 | header-y += affs_hardblocks.h |
16 | header-y += aio_abi.h | 17 | header-y += aio_abi.h |
@@ -326,7 +327,6 @@ unifdef-y += udp.h | |||
326 | unifdef-y += uinput.h | 327 | unifdef-y += uinput.h |
327 | unifdef-y += uio.h | 328 | unifdef-y += uio.h |
328 | unifdef-y += unistd.h | 329 | unifdef-y += unistd.h |
329 | unifdef-y += usb_ch9.h | ||
330 | unifdef-y += usbdevice_fs.h | 330 | unifdef-y += usbdevice_fs.h |
331 | unifdef-y += user.h | 331 | unifdef-y += user.h |
332 | unifdef-y += utsname.h | 332 | unifdef-y += utsname.h |
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 91f1f2363870..815f1fb4ce21 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -53,166 +53,6 @@ enum acpi_irq_model_id { | |||
53 | 53 | ||
54 | extern enum acpi_irq_model_id acpi_irq_model; | 54 | extern enum acpi_irq_model_id acpi_irq_model; |
55 | 55 | ||
56 | |||
57 | /* Root System Description Pointer (RSDP) */ | ||
58 | |||
59 | struct acpi_table_rsdp { | ||
60 | char signature[8]; | ||
61 | u8 checksum; | ||
62 | char oem_id[6]; | ||
63 | u8 revision; | ||
64 | u32 rsdt_address; | ||
65 | } __attribute__ ((packed)); | ||
66 | |||
67 | struct acpi20_table_rsdp { | ||
68 | char signature[8]; | ||
69 | u8 checksum; | ||
70 | char oem_id[6]; | ||
71 | u8 revision; | ||
72 | u32 rsdt_address; | ||
73 | u32 length; | ||
74 | u64 xsdt_address; | ||
75 | u8 ext_checksum; | ||
76 | u8 reserved[3]; | ||
77 | } __attribute__ ((packed)); | ||
78 | |||
79 | typedef struct { | ||
80 | u8 type; | ||
81 | u8 length; | ||
82 | } __attribute__ ((packed)) acpi_table_entry_header; | ||
83 | |||
84 | /* Root System Description Table (RSDT) */ | ||
85 | |||
86 | struct acpi_table_rsdt { | ||
87 | struct acpi_table_header header; | ||
88 | u32 entry[8]; | ||
89 | } __attribute__ ((packed)); | ||
90 | |||
91 | /* Extended System Description Table (XSDT) */ | ||
92 | |||
93 | struct acpi_table_xsdt { | ||
94 | struct acpi_table_header header; | ||
95 | u64 entry[1]; | ||
96 | } __attribute__ ((packed)); | ||
97 | |||
98 | /* Fixed ACPI Description Table (FADT) */ | ||
99 | |||
100 | struct acpi_table_fadt { | ||
101 | struct acpi_table_header header; | ||
102 | u32 facs_addr; | ||
103 | u32 dsdt_addr; | ||
104 | /* ... */ | ||
105 | } __attribute__ ((packed)); | ||
106 | |||
107 | /* Multiple APIC Description Table (MADT) */ | ||
108 | |||
109 | struct acpi_table_madt { | ||
110 | struct acpi_table_header header; | ||
111 | u32 lapic_address; | ||
112 | struct { | ||
113 | u32 pcat_compat:1; | ||
114 | u32 reserved:31; | ||
115 | } flags; | ||
116 | } __attribute__ ((packed)); | ||
117 | |||
118 | enum acpi_madt_entry_id { | ||
119 | ACPI_MADT_LAPIC = 0, | ||
120 | ACPI_MADT_IOAPIC, | ||
121 | ACPI_MADT_INT_SRC_OVR, | ||
122 | ACPI_MADT_NMI_SRC, | ||
123 | ACPI_MADT_LAPIC_NMI, | ||
124 | ACPI_MADT_LAPIC_ADDR_OVR, | ||
125 | ACPI_MADT_IOSAPIC, | ||
126 | ACPI_MADT_LSAPIC, | ||
127 | ACPI_MADT_PLAT_INT_SRC, | ||
128 | ACPI_MADT_ENTRY_COUNT | ||
129 | }; | ||
130 | |||
131 | typedef struct { | ||
132 | u16 polarity:2; | ||
133 | u16 trigger:2; | ||
134 | u16 reserved:12; | ||
135 | } __attribute__ ((packed)) acpi_interrupt_flags; | ||
136 | |||
137 | struct acpi_table_lapic { | ||
138 | acpi_table_entry_header header; | ||
139 | u8 acpi_id; | ||
140 | u8 id; | ||
141 | struct { | ||
142 | u32 enabled:1; | ||
143 | u32 reserved:31; | ||
144 | } flags; | ||
145 | } __attribute__ ((packed)); | ||
146 | |||
147 | struct acpi_table_ioapic { | ||
148 | acpi_table_entry_header header; | ||
149 | u8 id; | ||
150 | u8 reserved; | ||
151 | u32 address; | ||
152 | u32 global_irq_base; | ||
153 | } __attribute__ ((packed)); | ||
154 | |||
155 | struct acpi_table_int_src_ovr { | ||
156 | acpi_table_entry_header header; | ||
157 | u8 bus; | ||
158 | u8 bus_irq; | ||
159 | u32 global_irq; | ||
160 | acpi_interrupt_flags flags; | ||
161 | } __attribute__ ((packed)); | ||
162 | |||
163 | struct acpi_table_nmi_src { | ||
164 | acpi_table_entry_header header; | ||
165 | acpi_interrupt_flags flags; | ||
166 | u32 global_irq; | ||
167 | } __attribute__ ((packed)); | ||
168 | |||
169 | struct acpi_table_lapic_nmi { | ||
170 | acpi_table_entry_header header; | ||
171 | u8 acpi_id; | ||
172 | acpi_interrupt_flags flags; | ||
173 | u8 lint; | ||
174 | } __attribute__ ((packed)); | ||
175 | |||
176 | struct acpi_table_lapic_addr_ovr { | ||
177 | acpi_table_entry_header header; | ||
178 | u8 reserved[2]; | ||
179 | u64 address; | ||
180 | } __attribute__ ((packed)); | ||
181 | |||
182 | struct acpi_table_iosapic { | ||
183 | acpi_table_entry_header header; | ||
184 | u8 id; | ||
185 | u8 reserved; | ||
186 | u32 global_irq_base; | ||
187 | u64 address; | ||
188 | } __attribute__ ((packed)); | ||
189 | |||
190 | struct acpi_table_lsapic { | ||
191 | acpi_table_entry_header header; | ||
192 | u8 acpi_id; | ||
193 | u8 id; | ||
194 | u8 eid; | ||
195 | u8 reserved[3]; | ||
196 | struct { | ||
197 | u32 enabled:1; | ||
198 | u32 reserved:31; | ||
199 | } flags; | ||
200 | } __attribute__ ((packed)); | ||
201 | |||
202 | struct acpi_table_plat_int_src { | ||
203 | acpi_table_entry_header header; | ||
204 | acpi_interrupt_flags flags; | ||
205 | u8 type; /* See acpi_interrupt_type */ | ||
206 | u8 id; | ||
207 | u8 eid; | ||
208 | u8 iosapic_vector; | ||
209 | u32 global_irq; | ||
210 | struct { | ||
211 | u32 cpei_override_flag:1; | ||
212 | u32 reserved:31; | ||
213 | } plint_flags; | ||
214 | } __attribute__ ((packed)); | ||
215 | |||
216 | enum acpi_interrupt_id { | 56 | enum acpi_interrupt_id { |
217 | ACPI_INTERRUPT_PMI = 1, | 57 | ACPI_INTERRUPT_PMI = 1, |
218 | ACPI_INTERRUPT_INIT, | 58 | ACPI_INTERRUPT_INIT, |
@@ -222,89 +62,6 @@ enum acpi_interrupt_id { | |||
222 | 62 | ||
223 | #define ACPI_SPACE_MEM 0 | 63 | #define ACPI_SPACE_MEM 0 |
224 | 64 | ||
225 | struct acpi_gen_regaddr { | ||
226 | u8 space_id; | ||
227 | u8 bit_width; | ||
228 | u8 bit_offset; | ||
229 | u8 resv; | ||
230 | u32 addrl; | ||
231 | u32 addrh; | ||
232 | } __attribute__ ((packed)); | ||
233 | |||
234 | struct acpi_table_hpet { | ||
235 | struct acpi_table_header header; | ||
236 | u32 id; | ||
237 | struct acpi_gen_regaddr addr; | ||
238 | u8 number; | ||
239 | u16 min_tick; | ||
240 | u8 page_protect; | ||
241 | } __attribute__ ((packed)); | ||
242 | |||
243 | /* | ||
244 | * Simple Boot Flags | ||
245 | * http://www.microsoft.com/whdc/hwdev/resources/specs/simp_bios.mspx | ||
246 | */ | ||
247 | struct acpi_table_sbf | ||
248 | { | ||
249 | u8 sbf_signature[4]; | ||
250 | u32 sbf_len; | ||
251 | u8 sbf_revision; | ||
252 | u8 sbf_csum; | ||
253 | u8 sbf_oemid[6]; | ||
254 | u8 sbf_oemtable[8]; | ||
255 | u8 sbf_revdata[4]; | ||
256 | u8 sbf_creator[4]; | ||
257 | u8 sbf_crearev[4]; | ||
258 | u8 sbf_cmos; | ||
259 | u8 sbf_spare[3]; | ||
260 | } __attribute__ ((packed)); | ||
261 | |||
262 | /* | ||
263 | * System Resource Affinity Table (SRAT) | ||
264 | * http://www.microsoft.com/whdc/hwdev/platform/proc/SRAT.mspx | ||
265 | */ | ||
266 | |||
267 | struct acpi_table_srat { | ||
268 | struct acpi_table_header header; | ||
269 | u32 table_revision; | ||
270 | u64 reserved; | ||
271 | } __attribute__ ((packed)); | ||
272 | |||
273 | enum acpi_srat_entry_id { | ||
274 | ACPI_SRAT_PROCESSOR_AFFINITY = 0, | ||
275 | ACPI_SRAT_MEMORY_AFFINITY, | ||
276 | ACPI_SRAT_ENTRY_COUNT | ||
277 | }; | ||
278 | |||
279 | struct acpi_table_processor_affinity { | ||
280 | acpi_table_entry_header header; | ||
281 | u8 proximity_domain; | ||
282 | u8 apic_id; | ||
283 | struct { | ||
284 | u32 enabled:1; | ||
285 | u32 reserved:31; | ||
286 | } flags; | ||
287 | u8 lsapic_eid; | ||
288 | u8 reserved[7]; | ||
289 | } __attribute__ ((packed)); | ||
290 | |||
291 | struct acpi_table_memory_affinity { | ||
292 | acpi_table_entry_header header; | ||
293 | u8 proximity_domain; | ||
294 | u8 reserved1[5]; | ||
295 | u32 base_addr_lo; | ||
296 | u32 base_addr_hi; | ||
297 | u32 length_lo; | ||
298 | u32 length_hi; | ||
299 | u32 memory_type; /* See acpi_address_range_id */ | ||
300 | struct { | ||
301 | u32 enabled:1; | ||
302 | u32 hot_pluggable:1; | ||
303 | u32 reserved:30; | ||
304 | } flags; | ||
305 | u64 reserved2; | ||
306 | } __attribute__ ((packed)); | ||
307 | |||
308 | enum acpi_address_range_id { | 65 | enum acpi_address_range_id { |
309 | ACPI_ADDRESS_RANGE_MEMORY = 1, | 66 | ACPI_ADDRESS_RANGE_MEMORY = 1, |
310 | ACPI_ADDRESS_RANGE_RESERVED = 2, | 67 | ACPI_ADDRESS_RANGE_RESERVED = 2, |
@@ -313,84 +70,12 @@ enum acpi_address_range_id { | |||
313 | ACPI_ADDRESS_RANGE_COUNT | 70 | ACPI_ADDRESS_RANGE_COUNT |
314 | }; | 71 | }; |
315 | 72 | ||
316 | /* | ||
317 | * System Locality Information Table (SLIT) | ||
318 | * see http://devresource.hp.com/devresource/docs/techpapers/ia64/slit.pdf | ||
319 | */ | ||
320 | |||
321 | struct acpi_table_slit { | ||
322 | struct acpi_table_header header; | ||
323 | u64 localities; | ||
324 | u8 entry[1]; /* real size = localities^2 */ | ||
325 | } __attribute__ ((packed)); | ||
326 | |||
327 | /* Smart Battery Description Table (SBST) */ | ||
328 | |||
329 | struct acpi_table_sbst { | ||
330 | struct acpi_table_header header; | ||
331 | u32 warning; /* Warn user */ | ||
332 | u32 low; /* Critical sleep */ | ||
333 | u32 critical; /* Critical shutdown */ | ||
334 | } __attribute__ ((packed)); | ||
335 | |||
336 | /* Embedded Controller Boot Resources Table (ECDT) */ | ||
337 | |||
338 | struct acpi_table_ecdt { | ||
339 | struct acpi_table_header header; | ||
340 | struct acpi_generic_address ec_control; | ||
341 | struct acpi_generic_address ec_data; | ||
342 | u32 uid; | ||
343 | u8 gpe_bit; | ||
344 | char ec_id[0]; | ||
345 | } __attribute__ ((packed)); | ||
346 | |||
347 | /* PCI MMCONFIG */ | ||
348 | |||
349 | /* Defined in PCI Firmware Specification 3.0 */ | ||
350 | struct acpi_table_mcfg_config { | ||
351 | u32 base_address; | ||
352 | u32 base_reserved; | ||
353 | u16 pci_segment_group_number; | ||
354 | u8 start_bus_number; | ||
355 | u8 end_bus_number; | ||
356 | u8 reserved[4]; | ||
357 | } __attribute__ ((packed)); | ||
358 | struct acpi_table_mcfg { | ||
359 | struct acpi_table_header header; | ||
360 | u8 reserved[8]; | ||
361 | struct acpi_table_mcfg_config config[0]; | ||
362 | } __attribute__ ((packed)); | ||
363 | 73 | ||
364 | /* Table Handlers */ | 74 | /* Table Handlers */ |
365 | 75 | ||
366 | enum acpi_table_id { | 76 | typedef int (*acpi_table_handler) (struct acpi_table_header *table); |
367 | ACPI_TABLE_UNKNOWN = 0, | ||
368 | ACPI_APIC, | ||
369 | ACPI_BOOT, | ||
370 | ACPI_DBGP, | ||
371 | ACPI_DSDT, | ||
372 | ACPI_ECDT, | ||
373 | ACPI_ETDT, | ||
374 | ACPI_FADT, | ||
375 | ACPI_FACS, | ||
376 | ACPI_OEMX, | ||
377 | ACPI_PSDT, | ||
378 | ACPI_SBST, | ||
379 | ACPI_SLIT, | ||
380 | ACPI_SPCR, | ||
381 | ACPI_SRAT, | ||
382 | ACPI_SSDT, | ||
383 | ACPI_SPMI, | ||
384 | ACPI_HPET, | ||
385 | ACPI_MCFG, | ||
386 | ACPI_TABLE_COUNT | ||
387 | }; | ||
388 | |||
389 | typedef int (*acpi_table_handler) (unsigned long phys_addr, unsigned long size); | ||
390 | |||
391 | extern acpi_table_handler acpi_table_ops[ACPI_TABLE_COUNT]; | ||
392 | 77 | ||
393 | typedef int (*acpi_madt_entry_handler) (acpi_table_entry_header *header, const unsigned long end); | 78 | typedef int (*acpi_madt_entry_handler) (struct acpi_subtable_header *header, const unsigned long end); |
394 | 79 | ||
395 | char * __acpi_map_table (unsigned long phys_addr, unsigned long size); | 80 | char * __acpi_map_table (unsigned long phys_addr, unsigned long size); |
396 | unsigned long acpi_find_rsdp (void); | 81 | unsigned long acpi_find_rsdp (void); |
@@ -399,14 +84,12 @@ int acpi_boot_table_init (void); | |||
399 | int acpi_numa_init (void); | 84 | int acpi_numa_init (void); |
400 | 85 | ||
401 | int acpi_table_init (void); | 86 | int acpi_table_init (void); |
402 | int acpi_table_parse (enum acpi_table_id id, acpi_table_handler handler); | 87 | int acpi_table_parse (char *id, acpi_table_handler handler); |
403 | int acpi_get_table_header_early (enum acpi_table_id id, struct acpi_table_header **header); | 88 | int acpi_table_parse_madt (enum acpi_madt_type id, acpi_madt_entry_handler handler, unsigned int max_entries); |
404 | int acpi_table_parse_madt (enum acpi_madt_entry_id id, acpi_madt_entry_handler handler, unsigned int max_entries); | 89 | int acpi_table_parse_srat (enum acpi_srat_type id, acpi_madt_entry_handler handler, unsigned int max_entries); |
405 | int acpi_table_parse_srat (enum acpi_srat_entry_id id, acpi_madt_entry_handler handler, unsigned int max_entries); | 90 | int acpi_parse_mcfg (struct acpi_table_header *header); |
406 | int acpi_parse_mcfg (unsigned long phys_addr, unsigned long size); | 91 | void acpi_table_print_madt_entry (struct acpi_subtable_header *madt); |
407 | void acpi_table_print (struct acpi_table_header *header, unsigned long phys_addr); | 92 | void acpi_table_print_srat_entry (struct acpi_subtable_header *srat); |
408 | void acpi_table_print_madt_entry (acpi_table_entry_header *madt); | ||
409 | void acpi_table_print_srat_entry (acpi_table_entry_header *srat); | ||
410 | 93 | ||
411 | /* the following four functions are architecture-dependent */ | 94 | /* the following four functions are architecture-dependent */ |
412 | #ifdef CONFIG_HAVE_ARCH_PARSE_SRAT | 95 | #ifdef CONFIG_HAVE_ARCH_PARSE_SRAT |
@@ -417,8 +100,8 @@ void acpi_table_print_srat_entry (acpi_table_entry_header *srat); | |||
417 | #define acpi_numa_arch_fixup() do {} while (0) | 100 | #define acpi_numa_arch_fixup() do {} while (0) |
418 | #else | 101 | #else |
419 | void acpi_numa_slit_init (struct acpi_table_slit *slit); | 102 | void acpi_numa_slit_init (struct acpi_table_slit *slit); |
420 | void acpi_numa_processor_affinity_init (struct acpi_table_processor_affinity *pa); | 103 | void acpi_numa_processor_affinity_init (struct acpi_srat_cpu_affinity *pa); |
421 | void acpi_numa_memory_affinity_init (struct acpi_table_memory_affinity *ma); | 104 | void acpi_numa_memory_affinity_init (struct acpi_srat_mem_affinity *ma); |
422 | void acpi_numa_arch_fixup(void); | 105 | void acpi_numa_arch_fixup(void); |
423 | #endif | 106 | #endif |
424 | 107 | ||
@@ -433,7 +116,7 @@ int acpi_unregister_ioapic(acpi_handle handle, u32 gsi_base); | |||
433 | 116 | ||
434 | extern int acpi_mp_config; | 117 | extern int acpi_mp_config; |
435 | 118 | ||
436 | extern struct acpi_table_mcfg_config *pci_mmcfg_config; | 119 | extern struct acpi_mcfg_allocation *pci_mmcfg_config; |
437 | extern int pci_mmcfg_config_num; | 120 | extern int pci_mmcfg_config_num; |
438 | 121 | ||
439 | extern int sbf_port; | 122 | extern int sbf_port; |
diff --git a/include/linux/device.h b/include/linux/device.h index f44247fe8135..5ca1cdba563a 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -126,6 +126,7 @@ struct device_driver { | |||
126 | struct klist_node knode_bus; | 126 | struct klist_node knode_bus; |
127 | 127 | ||
128 | struct module * owner; | 128 | struct module * owner; |
129 | const char * mod_name; /* used for built-in modules */ | ||
129 | 130 | ||
130 | int (*probe) (struct device * dev); | 131 | int (*probe) (struct device * dev); |
131 | int (*remove) (struct device * dev); | 132 | int (*remove) (struct device * dev); |
@@ -327,6 +328,13 @@ extern struct class_device *class_device_create(struct class *cls, | |||
327 | __attribute__((format(printf,5,6))); | 328 | __attribute__((format(printf,5,6))); |
328 | extern void class_device_destroy(struct class *cls, dev_t devt); | 329 | extern void class_device_destroy(struct class *cls, dev_t devt); |
329 | 330 | ||
331 | struct device_type { | ||
332 | struct device_attribute *attrs; | ||
333 | int (*uevent)(struct device *dev, char **envp, int num_envp, | ||
334 | char *buffer, int buffer_size); | ||
335 | void (*release)(struct device *dev); | ||
336 | }; | ||
337 | |||
330 | /* interface for exporting device attributes */ | 338 | /* interface for exporting device attributes */ |
331 | struct device_attribute { | 339 | struct device_attribute { |
332 | struct attribute attr; | 340 | struct attribute attr; |
@@ -355,6 +363,7 @@ struct device { | |||
355 | 363 | ||
356 | struct kobject kobj; | 364 | struct kobject kobj; |
357 | char bus_id[BUS_ID_SIZE]; /* position on parent bus */ | 365 | char bus_id[BUS_ID_SIZE]; /* position on parent bus */ |
366 | struct device_type *type; | ||
358 | unsigned is_registered:1; | 367 | unsigned is_registered:1; |
359 | struct device_attribute uevent_attr; | 368 | struct device_attribute uevent_attr; |
360 | struct device_attribute *devt_attr; | 369 | struct device_attribute *devt_attr; |
@@ -390,9 +399,10 @@ struct device { | |||
390 | 399 | ||
391 | /* class_device migration path */ | 400 | /* class_device migration path */ |
392 | struct list_head node; | 401 | struct list_head node; |
393 | struct class *class; /* optional*/ | 402 | struct class *class; |
394 | dev_t devt; /* dev_t, creates the sysfs "dev" */ | 403 | dev_t devt; /* dev_t, creates the sysfs "dev" */ |
395 | struct attribute_group **groups; /* optional groups */ | 404 | struct attribute_group **groups; /* optional groups */ |
405 | int uevent_suppress; | ||
396 | 406 | ||
397 | void (*release)(struct device * dev); | 407 | void (*release)(struct device * dev); |
398 | }; | 408 | }; |
diff --git a/include/linux/hid.h b/include/linux/hid.h index 93173fe45634..d26b08f461f2 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h | |||
@@ -266,6 +266,7 @@ struct hid_item { | |||
266 | #define HID_QUIRK_BAD_RELATIVE_KEYS 0x00010000 | 266 | #define HID_QUIRK_BAD_RELATIVE_KEYS 0x00010000 |
267 | #define HID_QUIRK_SKIP_OUTPUT_REPORTS 0x00020000 | 267 | #define HID_QUIRK_SKIP_OUTPUT_REPORTS 0x00020000 |
268 | #define HID_QUIRK_IGNORE_MOUSE 0x00040000 | 268 | #define HID_QUIRK_IGNORE_MOUSE 0x00040000 |
269 | #define HID_QUIRK_SONY_PS3_CONTROLLER 0x00080000 | ||
269 | 270 | ||
270 | /* | 271 | /* |
271 | * This is the global environment of the parser. This information is | 272 | * This is the global environment of the parser. This information is |
diff --git a/include/linux/ide.h b/include/linux/ide.h index ba1c92999f6e..04e0fa97ac99 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -1207,8 +1207,8 @@ void ide_init_disk(struct gendisk *, ide_drive_t *); | |||
1207 | extern int ideprobe_init(void); | 1207 | extern int ideprobe_init(void); |
1208 | 1208 | ||
1209 | extern void ide_scan_pcibus(int scan_direction) __init; | 1209 | extern void ide_scan_pcibus(int scan_direction) __init; |
1210 | extern int __ide_pci_register_driver(struct pci_driver *driver, struct module *owner); | 1210 | extern int __ide_pci_register_driver(struct pci_driver *driver, struct module *owner, const char *mod_name); |
1211 | #define ide_pci_register_driver(d) __ide_pci_register_driver(d, THIS_MODULE) | 1211 | #define ide_pci_register_driver(d) __ide_pci_register_driver(d, THIS_MODULE, KBUILD_MODNAME) |
1212 | void ide_pci_setup_ports(struct pci_dev *, struct ide_pci_device_s *, int, ata_index_t *); | 1212 | void ide_pci_setup_ports(struct pci_dev *, struct ide_pci_device_s *, int, ata_index_t *); |
1213 | extern void ide_setup_pci_noise (struct pci_dev *dev, struct ide_pci_device_s *d); | 1213 | extern void ide_setup_pci_noise (struct pci_dev *dev, struct ide_pci_device_s *d); |
1214 | 1214 | ||
diff --git a/include/linux/irq.h b/include/linux/irq.h index 52fc4052a0ae..5504b671357f 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -68,6 +68,7 @@ typedef void fastcall (*irq_flow_handler_t)(unsigned int irq, | |||
68 | #define IRQ_MOVE_PENDING 0x40000000 /* need to re-target IRQ destination */ | 68 | #define IRQ_MOVE_PENDING 0x40000000 /* need to re-target IRQ destination */ |
69 | 69 | ||
70 | struct proc_dir_entry; | 70 | struct proc_dir_entry; |
71 | struct msi_desc; | ||
71 | 72 | ||
72 | /** | 73 | /** |
73 | * struct irq_chip - hardware interrupt chip descriptor | 74 | * struct irq_chip - hardware interrupt chip descriptor |
@@ -148,6 +149,7 @@ struct irq_chip { | |||
148 | struct irq_desc { | 149 | struct irq_desc { |
149 | irq_flow_handler_t handle_irq; | 150 | irq_flow_handler_t handle_irq; |
150 | struct irq_chip *chip; | 151 | struct irq_chip *chip; |
152 | struct msi_desc *msi_desc; | ||
151 | void *handler_data; | 153 | void *handler_data; |
152 | void *chip_data; | 154 | void *chip_data; |
153 | struct irqaction *action; /* IRQ action list */ | 155 | struct irqaction *action; /* IRQ action list */ |
@@ -373,10 +375,12 @@ extern int set_irq_chip(unsigned int irq, struct irq_chip *chip); | |||
373 | extern int set_irq_data(unsigned int irq, void *data); | 375 | extern int set_irq_data(unsigned int irq, void *data); |
374 | extern int set_irq_chip_data(unsigned int irq, void *data); | 376 | extern int set_irq_chip_data(unsigned int irq, void *data); |
375 | extern int set_irq_type(unsigned int irq, unsigned int type); | 377 | extern int set_irq_type(unsigned int irq, unsigned int type); |
378 | extern int set_irq_msi(unsigned int irq, struct msi_desc *entry); | ||
376 | 379 | ||
377 | #define get_irq_chip(irq) (irq_desc[irq].chip) | 380 | #define get_irq_chip(irq) (irq_desc[irq].chip) |
378 | #define get_irq_chip_data(irq) (irq_desc[irq].chip_data) | 381 | #define get_irq_chip_data(irq) (irq_desc[irq].chip_data) |
379 | #define get_irq_data(irq) (irq_desc[irq].handler_data) | 382 | #define get_irq_data(irq) (irq_desc[irq].handler_data) |
383 | #define get_irq_msi(irq) (irq_desc[irq].msi_desc) | ||
380 | 384 | ||
381 | #endif /* CONFIG_GENERIC_HARDIRQS */ | 385 | #endif /* CONFIG_GENERIC_HARDIRQS */ |
382 | 386 | ||
diff --git a/include/linux/kobject.h b/include/linux/kobject.h index 76538fcf2c4e..b850e0310538 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h | |||
@@ -74,9 +74,13 @@ extern void kobject_init(struct kobject *); | |||
74 | extern void kobject_cleanup(struct kobject *); | 74 | extern void kobject_cleanup(struct kobject *); |
75 | 75 | ||
76 | extern int __must_check kobject_add(struct kobject *); | 76 | extern int __must_check kobject_add(struct kobject *); |
77 | extern int __must_check kobject_shadow_add(struct kobject *, struct dentry *); | ||
77 | extern void kobject_del(struct kobject *); | 78 | extern void kobject_del(struct kobject *); |
78 | 79 | ||
79 | extern int __must_check kobject_rename(struct kobject *, const char *new_name); | 80 | extern int __must_check kobject_rename(struct kobject *, const char *new_name); |
81 | extern int __must_check kobject_shadow_rename(struct kobject *kobj, | ||
82 | struct dentry *new_parent, | ||
83 | const char *new_name); | ||
80 | extern int __must_check kobject_move(struct kobject *, struct kobject *); | 84 | extern int __must_check kobject_move(struct kobject *, struct kobject *); |
81 | 85 | ||
82 | extern int __must_check kobject_register(struct kobject *); | 86 | extern int __must_check kobject_register(struct kobject *); |
diff --git a/include/linux/module.h b/include/linux/module.h index 10f771a49997..419d3ef293dd 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
@@ -58,6 +58,7 @@ struct module_kobject | |||
58 | { | 58 | { |
59 | struct kobject kobj; | 59 | struct kobject kobj; |
60 | struct module *mod; | 60 | struct module *mod; |
61 | struct kobject *drivers_dir; | ||
61 | }; | 62 | }; |
62 | 63 | ||
63 | /* These are either module local, or the kernel's dummy ones. */ | 64 | /* These are either module local, or the kernel's dummy ones. */ |
@@ -263,7 +264,7 @@ struct module | |||
263 | struct module_attribute *modinfo_attrs; | 264 | struct module_attribute *modinfo_attrs; |
264 | const char *version; | 265 | const char *version; |
265 | const char *srcversion; | 266 | const char *srcversion; |
266 | struct kobject *drivers_dir; | 267 | struct kobject *holders_dir; |
267 | 268 | ||
268 | /* Exported symbols */ | 269 | /* Exported symbols */ |
269 | const struct kernel_symbol *syms; | 270 | const struct kernel_symbol *syms; |
diff --git a/include/linux/msi.h b/include/linux/msi.h index c7ef94343673..74c8a2ecc9dd 100644 --- a/include/linux/msi.h +++ b/include/linux/msi.h | |||
@@ -7,11 +7,10 @@ struct msi_msg { | |||
7 | u32 data; /* 16 bits of msi message data */ | 7 | u32 data; /* 16 bits of msi message data */ |
8 | }; | 8 | }; |
9 | 9 | ||
10 | /* Heper functions */ | 10 | /* Helper functions */ |
11 | extern void mask_msi_irq(unsigned int irq); | 11 | extern void mask_msi_irq(unsigned int irq); |
12 | extern void unmask_msi_irq(unsigned int irq); | 12 | extern void unmask_msi_irq(unsigned int irq); |
13 | extern void read_msi_msg(unsigned int irq, struct msi_msg *msg); | 13 | extern void read_msi_msg(unsigned int irq, struct msi_msg *msg); |
14 | |||
15 | extern void write_msi_msg(unsigned int irq, struct msi_msg *msg); | 14 | extern void write_msi_msg(unsigned int irq, struct msi_msg *msg); |
16 | 15 | ||
17 | struct msi_desc { | 16 | struct msi_desc { |
@@ -42,7 +41,7 @@ struct msi_desc { | |||
42 | /* | 41 | /* |
43 | * The arch hook for setup up msi irqs | 42 | * The arch hook for setup up msi irqs |
44 | */ | 43 | */ |
45 | int arch_setup_msi_irq(unsigned int irq, struct pci_dev *dev); | 44 | int arch_setup_msi_irq(struct pci_dev *dev, struct msi_desc *desc); |
46 | void arch_teardown_msi_irq(unsigned int irq); | 45 | void arch_teardown_msi_irq(unsigned int irq); |
47 | 46 | ||
48 | 47 | ||
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index fea0d9db6846..2e37f5012788 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -529,10 +529,11 @@ struct net_device | |||
529 | struct net_bridge_port *br_port; | 529 | struct net_bridge_port *br_port; |
530 | 530 | ||
531 | /* class/net/name entry */ | 531 | /* class/net/name entry */ |
532 | struct class_device class_dev; | 532 | struct device dev; |
533 | /* space for optional statistics and wireless sysfs groups */ | 533 | /* space for optional statistics and wireless sysfs groups */ |
534 | struct attribute_group *sysfs_groups[3]; | 534 | struct attribute_group *sysfs_groups[3]; |
535 | }; | 535 | }; |
536 | #define to_net_dev(d) container_of(d, struct net_device, dev) | ||
536 | 537 | ||
537 | #define NETDEV_ALIGN 32 | 538 | #define NETDEV_ALIGN 32 |
538 | #define NETDEV_ALIGN_CONST (NETDEV_ALIGN - 1) | 539 | #define NETDEV_ALIGN_CONST (NETDEV_ALIGN - 1) |
@@ -548,7 +549,7 @@ static inline void *netdev_priv(struct net_device *dev) | |||
548 | /* Set the sysfs physical device reference for the network logical device | 549 | /* Set the sysfs physical device reference for the network logical device |
549 | * if set prior to registration will cause a symlink during initialization. | 550 | * if set prior to registration will cause a symlink during initialization. |
550 | */ | 551 | */ |
551 | #define SET_NETDEV_DEV(net, pdev) ((net)->class_dev.dev = (pdev)) | 552 | #define SET_NETDEV_DEV(net, pdev) ((net)->dev.parent = (pdev)) |
552 | 553 | ||
553 | struct packet_type { | 554 | struct packet_type { |
554 | __be16 type; /* This is really htons(ether_type). */ | 555 | __be16 type; /* This is really htons(ether_type). */ |
diff --git a/include/linux/pci.h b/include/linux/pci.h index f3c617eabd8d..805412cc6875 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -174,6 +174,9 @@ struct pci_dev { | |||
174 | struct bin_attribute *rom_attr; /* attribute descriptor for sysfs ROM entry */ | 174 | struct bin_attribute *rom_attr; /* attribute descriptor for sysfs ROM entry */ |
175 | int rom_attr_enabled; /* has display of the rom attribute been enabled? */ | 175 | int rom_attr_enabled; /* has display of the rom attribute been enabled? */ |
176 | struct bin_attribute *res_attr[DEVICE_COUNT_RESOURCE]; /* sysfs file for resources */ | 176 | struct bin_attribute *res_attr[DEVICE_COUNT_RESOURCE]; /* sysfs file for resources */ |
177 | #ifdef CONFIG_PCI_MSI | ||
178 | unsigned int first_msi_irq; | ||
179 | #endif | ||
177 | }; | 180 | }; |
178 | 181 | ||
179 | #define pci_dev_g(n) list_entry(n, struct pci_dev, global_list) | 182 | #define pci_dev_g(n) list_entry(n, struct pci_dev, global_list) |
@@ -181,6 +184,11 @@ struct pci_dev { | |||
181 | #define to_pci_dev(n) container_of(n, struct pci_dev, dev) | 184 | #define to_pci_dev(n) container_of(n, struct pci_dev, dev) |
182 | #define for_each_pci_dev(d) while ((d = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, d)) != NULL) | 185 | #define for_each_pci_dev(d) while ((d = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, d)) != NULL) |
183 | 186 | ||
187 | static inline int pci_channel_offline(struct pci_dev *pdev) | ||
188 | { | ||
189 | return (pdev->error_state != pci_channel_io_normal); | ||
190 | } | ||
191 | |||
184 | static inline struct pci_cap_saved_state *pci_find_saved_cap( | 192 | static inline struct pci_cap_saved_state *pci_find_saved_cap( |
185 | struct pci_dev *pci_dev,char cap) | 193 | struct pci_dev *pci_dev,char cap) |
186 | { | 194 | { |
@@ -463,8 +471,7 @@ extern void pci_sort_breadthfirst(void); | |||
463 | 471 | ||
464 | /* Generic PCI functions exported to card drivers */ | 472 | /* Generic PCI functions exported to card drivers */ |
465 | 473 | ||
466 | struct pci_dev *pci_find_device (unsigned int vendor, unsigned int device, const struct pci_dev *from); | 474 | struct pci_dev __deprecated *pci_find_device (unsigned int vendor, unsigned int device, const struct pci_dev *from); |
467 | struct pci_dev *pci_find_device_reverse (unsigned int vendor, unsigned int device, const struct pci_dev *from); | ||
468 | struct pci_dev *pci_find_slot (unsigned int bus, unsigned int devfn); | 475 | struct pci_dev *pci_find_slot (unsigned int bus, unsigned int devfn); |
469 | int pci_find_capability (struct pci_dev *dev, int cap); | 476 | int pci_find_capability (struct pci_dev *dev, int cap); |
470 | int pci_find_next_capability (struct pci_dev *dev, u8 pos, int cap); | 477 | int pci_find_next_capability (struct pci_dev *dev, u8 pos, int cap); |
@@ -533,6 +540,7 @@ void pci_update_resource(struct pci_dev *dev, struct resource *res, int resno); | |||
533 | int __must_check pci_assign_resource(struct pci_dev *dev, int i); | 540 | int __must_check pci_assign_resource(struct pci_dev *dev, int i); |
534 | int __must_check pci_assign_resource_fixed(struct pci_dev *dev, int i); | 541 | int __must_check pci_assign_resource_fixed(struct pci_dev *dev, int i); |
535 | void pci_restore_bars(struct pci_dev *dev); | 542 | void pci_restore_bars(struct pci_dev *dev); |
543 | int pci_select_bars(struct pci_dev *dev, unsigned long flags); | ||
536 | 544 | ||
537 | /* ROM control related routines */ | 545 | /* ROM control related routines */ |
538 | void __iomem __must_check *pci_map_rom(struct pci_dev *pdev, size_t *size); | 546 | void __iomem __must_check *pci_map_rom(struct pci_dev *pdev, size_t *size); |
@@ -561,6 +569,8 @@ int __must_check pci_request_regions(struct pci_dev *, const char *); | |||
561 | void pci_release_regions(struct pci_dev *); | 569 | void pci_release_regions(struct pci_dev *); |
562 | int __must_check pci_request_region(struct pci_dev *, int, const char *); | 570 | int __must_check pci_request_region(struct pci_dev *, int, const char *); |
563 | void pci_release_region(struct pci_dev *, int); | 571 | void pci_release_region(struct pci_dev *, int); |
572 | int pci_request_selected_regions(struct pci_dev *, int, const char *); | ||
573 | void pci_release_selected_regions(struct pci_dev *, int); | ||
564 | 574 | ||
565 | /* drivers/pci/bus.c */ | 575 | /* drivers/pci/bus.c */ |
566 | int __must_check pci_bus_alloc_resource(struct pci_bus *bus, | 576 | int __must_check pci_bus_alloc_resource(struct pci_bus *bus, |
@@ -573,10 +583,11 @@ int __must_check pci_bus_alloc_resource(struct pci_bus *bus, | |||
573 | void pci_enable_bridges(struct pci_bus *bus); | 583 | void pci_enable_bridges(struct pci_bus *bus); |
574 | 584 | ||
575 | /* Proper probing supporting hot-pluggable devices */ | 585 | /* Proper probing supporting hot-pluggable devices */ |
576 | int __must_check __pci_register_driver(struct pci_driver *, struct module *); | 586 | int __must_check __pci_register_driver(struct pci_driver *, struct module *, |
587 | const char *mod_name); | ||
577 | static inline int __must_check pci_register_driver(struct pci_driver *driver) | 588 | static inline int __must_check pci_register_driver(struct pci_driver *driver) |
578 | { | 589 | { |
579 | return __pci_register_driver(driver, THIS_MODULE); | 590 | return __pci_register_driver(driver, THIS_MODULE, KBUILD_MODNAME); |
580 | } | 591 | } |
581 | 592 | ||
582 | void pci_unregister_driver(struct pci_driver *); | 593 | void pci_unregister_driver(struct pci_driver *); |
@@ -611,10 +622,6 @@ enum pci_dma_burst_strategy { | |||
611 | strategy_parameter byte boundaries */ | 622 | strategy_parameter byte boundaries */ |
612 | }; | 623 | }; |
613 | 624 | ||
614 | #if defined(CONFIG_ISA) || defined(CONFIG_EISA) | ||
615 | extern struct pci_dev *isa_bridge; | ||
616 | #endif | ||
617 | |||
618 | struct msix_entry { | 625 | struct msix_entry { |
619 | u16 vector; /* kernel uses to write allocated vector */ | 626 | u16 vector; /* kernel uses to write allocated vector */ |
620 | u16 entry; /* driver uses to specify entry, OS writes */ | 627 | u16 entry; /* driver uses to specify entry, OS writes */ |
@@ -622,7 +629,6 @@ struct msix_entry { | |||
622 | 629 | ||
623 | 630 | ||
624 | #ifndef CONFIG_PCI_MSI | 631 | #ifndef CONFIG_PCI_MSI |
625 | static inline void pci_scan_msi_device(struct pci_dev *dev) {} | ||
626 | static inline int pci_enable_msi(struct pci_dev *dev) {return -1;} | 632 | static inline int pci_enable_msi(struct pci_dev *dev) {return -1;} |
627 | static inline void pci_disable_msi(struct pci_dev *dev) {} | 633 | static inline void pci_disable_msi(struct pci_dev *dev) {} |
628 | static inline int pci_enable_msix(struct pci_dev* dev, | 634 | static inline int pci_enable_msix(struct pci_dev* dev, |
@@ -630,7 +636,6 @@ static inline int pci_enable_msix(struct pci_dev* dev, | |||
630 | static inline void pci_disable_msix(struct pci_dev *dev) {} | 636 | static inline void pci_disable_msix(struct pci_dev *dev) {} |
631 | static inline void msi_remove_pci_irq_vectors(struct pci_dev *dev) {} | 637 | static inline void msi_remove_pci_irq_vectors(struct pci_dev *dev) {} |
632 | #else | 638 | #else |
633 | extern void pci_scan_msi_device(struct pci_dev *dev); | ||
634 | extern int pci_enable_msi(struct pci_dev *dev); | 639 | extern int pci_enable_msi(struct pci_dev *dev); |
635 | extern void pci_disable_msi(struct pci_dev *dev); | 640 | extern void pci_disable_msi(struct pci_dev *dev); |
636 | extern int pci_enable_msix(struct pci_dev* dev, | 641 | extern int pci_enable_msix(struct pci_dev* dev, |
@@ -722,8 +727,6 @@ static inline int pci_set_power_state(struct pci_dev *dev, pci_power_t state) { | |||
722 | static inline pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state) { return PCI_D0; } | 727 | static inline pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state) { return PCI_D0; } |
723 | static inline int pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable) { return 0; } | 728 | static inline int pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable) { return 0; } |
724 | 729 | ||
725 | #define isa_bridge ((struct pci_dev *)NULL) | ||
726 | |||
727 | #define pci_dma_burst_advice(pdev, strat, strategy_parameter) do { } while (0) | 730 | #define pci_dma_burst_advice(pdev, strat, strategy_parameter) do { } while (0) |
728 | 731 | ||
729 | static inline void pci_block_user_cfg_access(struct pci_dev *dev) { } | 732 | static inline void pci_block_user_cfg_access(struct pci_dev *dev) { } |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index b859faf5184d..defdeed20641 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -2071,6 +2071,8 @@ | |||
2071 | #define PCI_VENDOR_ID_TDI 0x192E | 2071 | #define PCI_VENDOR_ID_TDI 0x192E |
2072 | #define PCI_DEVICE_ID_TDI_EHCI 0x0101 | 2072 | #define PCI_DEVICE_ID_TDI_EHCI 0x0101 |
2073 | 2073 | ||
2074 | #define PCI_VENDOR_ID_PASEMI 0x1959 | ||
2075 | |||
2074 | #define PCI_VENDOR_ID_JMICRON 0x197B | 2076 | #define PCI_VENDOR_ID_JMICRON 0x197B |
2075 | #define PCI_DEVICE_ID_JMICRON_JMB360 0x2360 | 2077 | #define PCI_DEVICE_ID_JMICRON_JMB360 0x2360 |
2076 | #define PCI_DEVICE_ID_JMICRON_JMB361 0x2361 | 2078 | #define PCI_DEVICE_ID_JMICRON_JMB361 0x2361 |
diff --git a/include/linux/serio.h b/include/linux/serio.h index 0f478a8791a2..ac2c70e7f760 100644 --- a/include/linux/serio.h +++ b/include/linux/serio.h | |||
@@ -86,6 +86,11 @@ static inline void serio_register_port(struct serio *serio) | |||
86 | void serio_unregister_port(struct serio *serio); | 86 | void serio_unregister_port(struct serio *serio); |
87 | void serio_unregister_child_port(struct serio *serio); | 87 | void serio_unregister_child_port(struct serio *serio); |
88 | 88 | ||
89 | int __serio_register_driver(struct serio_driver *drv, struct module *owner, const char *mod_name); | ||
90 | static inline int serio_register_driver(struct serio_driver *drv) | ||
91 | { | ||
92 | return __serio_register_driver(drv, THIS_MODULE, KBUILD_MODNAME); | ||
93 | } | ||
89 | int serio_register_driver(struct serio_driver *drv); | 94 | int serio_register_driver(struct serio_driver *drv); |
90 | void serio_unregister_driver(struct serio_driver *drv); | 95 | void serio_unregister_driver(struct serio_driver *drv); |
91 | 96 | ||
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index 176f6e36dbfa..8c2edd82a073 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h | |||
@@ -170,7 +170,7 @@ static inline void spi_unregister_driver(struct spi_driver *sdrv) | |||
170 | * message's completion function when the transaction completes. | 170 | * message's completion function when the transaction completes. |
171 | */ | 171 | */ |
172 | struct spi_master { | 172 | struct spi_master { |
173 | struct class_device cdev; | 173 | struct device dev; |
174 | 174 | ||
175 | /* other than negative (== assign one dynamically), bus_num is fully | 175 | /* other than negative (== assign one dynamically), bus_num is fully |
176 | * board-specific. usually that simplifies to being SOC-specific. | 176 | * board-specific. usually that simplifies to being SOC-specific. |
@@ -216,17 +216,17 @@ struct spi_master { | |||
216 | 216 | ||
217 | static inline void *spi_master_get_devdata(struct spi_master *master) | 217 | static inline void *spi_master_get_devdata(struct spi_master *master) |
218 | { | 218 | { |
219 | return class_get_devdata(&master->cdev); | 219 | return dev_get_drvdata(&master->dev); |
220 | } | 220 | } |
221 | 221 | ||
222 | static inline void spi_master_set_devdata(struct spi_master *master, void *data) | 222 | static inline void spi_master_set_devdata(struct spi_master *master, void *data) |
223 | { | 223 | { |
224 | class_set_devdata(&master->cdev, data); | 224 | dev_set_drvdata(&master->dev, data); |
225 | } | 225 | } |
226 | 226 | ||
227 | static inline struct spi_master *spi_master_get(struct spi_master *master) | 227 | static inline struct spi_master *spi_master_get(struct spi_master *master) |
228 | { | 228 | { |
229 | if (!master || !class_device_get(&master->cdev)) | 229 | if (!master || !get_device(&master->dev)) |
230 | return NULL; | 230 | return NULL; |
231 | return master; | 231 | return master; |
232 | } | 232 | } |
@@ -234,7 +234,7 @@ static inline struct spi_master *spi_master_get(struct spi_master *master) | |||
234 | static inline void spi_master_put(struct spi_master *master) | 234 | static inline void spi_master_put(struct spi_master *master) |
235 | { | 235 | { |
236 | if (master) | 236 | if (master) |
237 | class_device_put(&master->cdev); | 237 | put_device(&master->dev); |
238 | } | 238 | } |
239 | 239 | ||
240 | 240 | ||
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index 2129d1b6c874..192de3afa96b 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h | |||
@@ -11,10 +11,12 @@ | |||
11 | #define _SYSFS_H_ | 11 | #define _SYSFS_H_ |
12 | 12 | ||
13 | #include <linux/compiler.h> | 13 | #include <linux/compiler.h> |
14 | #include <linux/list.h> | ||
14 | #include <asm/atomic.h> | 15 | #include <asm/atomic.h> |
15 | 16 | ||
16 | struct kobject; | 17 | struct kobject; |
17 | struct module; | 18 | struct module; |
19 | struct nameidata; | ||
18 | 20 | ||
19 | struct attribute { | 21 | struct attribute { |
20 | const char * name; | 22 | const char * name; |
@@ -88,13 +90,13 @@ struct sysfs_dirent { | |||
88 | #ifdef CONFIG_SYSFS | 90 | #ifdef CONFIG_SYSFS |
89 | 91 | ||
90 | extern int __must_check | 92 | extern int __must_check |
91 | sysfs_create_dir(struct kobject *); | 93 | sysfs_create_dir(struct kobject *, struct dentry *); |
92 | 94 | ||
93 | extern void | 95 | extern void |
94 | sysfs_remove_dir(struct kobject *); | 96 | sysfs_remove_dir(struct kobject *); |
95 | 97 | ||
96 | extern int __must_check | 98 | extern int __must_check |
97 | sysfs_rename_dir(struct kobject *, const char *new_name); | 99 | sysfs_rename_dir(struct kobject *, struct dentry *, const char *new_name); |
98 | 100 | ||
99 | extern int __must_check | 101 | extern int __must_check |
100 | sysfs_move_dir(struct kobject *, struct kobject *); | 102 | sysfs_move_dir(struct kobject *, struct kobject *); |
@@ -126,11 +128,17 @@ int __must_check sysfs_create_group(struct kobject *, | |||
126 | void sysfs_remove_group(struct kobject *, const struct attribute_group *); | 128 | void sysfs_remove_group(struct kobject *, const struct attribute_group *); |
127 | void sysfs_notify(struct kobject * k, char *dir, char *attr); | 129 | void sysfs_notify(struct kobject * k, char *dir, char *attr); |
128 | 130 | ||
131 | |||
132 | extern int sysfs_make_shadowed_dir(struct kobject *kobj, | ||
133 | void * (*follow_link)(struct dentry *, struct nameidata *)); | ||
134 | extern struct dentry *sysfs_create_shadow_dir(struct kobject *kobj); | ||
135 | extern void sysfs_remove_shadow_dir(struct dentry *dir); | ||
136 | |||
129 | extern int __must_check sysfs_init(void); | 137 | extern int __must_check sysfs_init(void); |
130 | 138 | ||
131 | #else /* CONFIG_SYSFS */ | 139 | #else /* CONFIG_SYSFS */ |
132 | 140 | ||
133 | static inline int sysfs_create_dir(struct kobject * k) | 141 | static inline int sysfs_create_dir(struct kobject * k, struct dentry *shadow) |
134 | { | 142 | { |
135 | return 0; | 143 | return 0; |
136 | } | 144 | } |
@@ -140,7 +148,9 @@ static inline void sysfs_remove_dir(struct kobject * k) | |||
140 | ; | 148 | ; |
141 | } | 149 | } |
142 | 150 | ||
143 | static inline int sysfs_rename_dir(struct kobject * k, const char *new_name) | 151 | static inline int sysfs_rename_dir(struct kobject * k, |
152 | struct dentry *new_parent, | ||
153 | const char *new_name) | ||
144 | { | 154 | { |
145 | return 0; | 155 | return 0; |
146 | } | 156 | } |
@@ -204,6 +214,12 @@ static inline void sysfs_notify(struct kobject * k, char *dir, char *attr) | |||
204 | { | 214 | { |
205 | } | 215 | } |
206 | 216 | ||
217 | static inline int sysfs_make_shadowed_dir(struct kobject *kobj, | ||
218 | void * (*follow_link)(struct dentry *, struct nameidata *)) | ||
219 | { | ||
220 | return 0; | ||
221 | } | ||
222 | |||
207 | static inline int __must_check sysfs_init(void) | 223 | static inline int __must_check sysfs_init(void) |
208 | { | 224 | { |
209 | return 0; | 225 | return 0; |
diff --git a/include/linux/usb.h b/include/linux/usb.h index aab5b1b72021..b5c226a87ed8 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -2,7 +2,7 @@ | |||
2 | #define __LINUX_USB_H | 2 | #define __LINUX_USB_H |
3 | 3 | ||
4 | #include <linux/mod_devicetable.h> | 4 | #include <linux/mod_devicetable.h> |
5 | #include <linux/usb_ch9.h> | 5 | #include <linux/usb/ch9.h> |
6 | 6 | ||
7 | #define USB_MAJOR 180 | 7 | #define USB_MAJOR 180 |
8 | #define USB_DEVICE_MAJOR 189 | 8 | #define USB_DEVICE_MAJOR 189 |
@@ -107,7 +107,8 @@ enum usb_interface_condition { | |||
107 | * @needs_remote_wakeup: flag set when the driver requires remote-wakeup | 107 | * @needs_remote_wakeup: flag set when the driver requires remote-wakeup |
108 | * capability during autosuspend. | 108 | * capability during autosuspend. |
109 | * @dev: driver model's view of this device | 109 | * @dev: driver model's view of this device |
110 | * @class_dev: driver model's class view of this device. | 110 | * @usb_dev: if an interface is bound to the USB major, this will point |
111 | * to the sysfs representation for that device. | ||
111 | * @pm_usage_cnt: PM usage counter for this interface; autosuspend is not | 112 | * @pm_usage_cnt: PM usage counter for this interface; autosuspend is not |
112 | * allowed unless the counter is 0. | 113 | * allowed unless the counter is 0. |
113 | * | 114 | * |
@@ -152,7 +153,7 @@ struct usb_interface { | |||
152 | unsigned needs_remote_wakeup:1; /* driver requires remote wakeup */ | 153 | unsigned needs_remote_wakeup:1; /* driver requires remote wakeup */ |
153 | 154 | ||
154 | struct device dev; /* interface specific device info */ | 155 | struct device dev; /* interface specific device info */ |
155 | struct class_device *class_dev; | 156 | struct device *usb_dev; /* pointer to the usb class's device, if any */ |
156 | int pm_usage_cnt; /* usage counter for autosuspend */ | 157 | int pm_usage_cnt; /* usage counter for autosuspend */ |
157 | }; | 158 | }; |
158 | #define to_usb_interface(d) container_of(d, struct usb_interface, dev) | 159 | #define to_usb_interface(d) container_of(d, struct usb_interface, dev) |
@@ -372,7 +373,7 @@ struct usb_device { | |||
372 | char *serial; /* iSerialNumber string, if present */ | 373 | char *serial; /* iSerialNumber string, if present */ |
373 | 374 | ||
374 | struct list_head filelist; | 375 | struct list_head filelist; |
375 | struct class_device *class_dev; | 376 | struct device *usbfs_dev; |
376 | struct dentry *usbfs_dentry; /* usbfs dentry entry for the device */ | 377 | struct dentry *usbfs_dentry; /* usbfs dentry entry for the device */ |
377 | 378 | ||
378 | /* | 379 | /* |
@@ -475,6 +476,8 @@ extern void usb_driver_release_interface(struct usb_driver *driver, | |||
475 | struct usb_interface *iface); | 476 | struct usb_interface *iface); |
476 | const struct usb_device_id *usb_match_id(struct usb_interface *interface, | 477 | const struct usb_device_id *usb_match_id(struct usb_interface *interface, |
477 | const struct usb_device_id *id); | 478 | const struct usb_device_id *id); |
479 | extern int usb_match_one_id(struct usb_interface *interface, | ||
480 | const struct usb_device_id *id); | ||
478 | 481 | ||
479 | extern struct usb_interface *usb_find_interface(struct usb_driver *drv, | 482 | extern struct usb_interface *usb_find_interface(struct usb_driver *drv, |
480 | int minor); | 483 | int minor); |
@@ -554,6 +557,18 @@ static inline int usb_endpoint_xfer_bulk(const struct usb_endpoint_descriptor *e | |||
554 | } | 557 | } |
555 | 558 | ||
556 | /** | 559 | /** |
560 | * usb_endpoint_xfer_control - check if the endpoint has control transfer type | ||
561 | * @epd: endpoint to be checked | ||
562 | * | ||
563 | * Returns true if the endpoint is of type control, otherwise it returns false. | ||
564 | */ | ||
565 | static inline int usb_endpoint_xfer_control(const struct usb_endpoint_descriptor *epd) | ||
566 | { | ||
567 | return ((epd->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == | ||
568 | USB_ENDPOINT_XFER_CONTROL); | ||
569 | } | ||
570 | |||
571 | /** | ||
557 | * usb_endpoint_xfer_int - check if the endpoint has interrupt transfer type | 572 | * usb_endpoint_xfer_int - check if the endpoint has interrupt transfer type |
558 | * @epd: endpoint to be checked | 573 | * @epd: endpoint to be checked |
559 | * | 574 | * |
@@ -723,11 +738,21 @@ static inline int usb_endpoint_is_isoc_out(const struct usb_endpoint_descriptor | |||
723 | 738 | ||
724 | /* ----------------------------------------------------------------------- */ | 739 | /* ----------------------------------------------------------------------- */ |
725 | 740 | ||
741 | /* Stuff for dynamic usb ids */ | ||
726 | struct usb_dynids { | 742 | struct usb_dynids { |
727 | spinlock_t lock; | 743 | spinlock_t lock; |
728 | struct list_head list; | 744 | struct list_head list; |
729 | }; | 745 | }; |
730 | 746 | ||
747 | struct usb_dynid { | ||
748 | struct list_head node; | ||
749 | struct usb_device_id id; | ||
750 | }; | ||
751 | |||
752 | extern ssize_t usb_store_new_id(struct usb_dynids *dynids, | ||
753 | struct device_driver *driver, | ||
754 | const char *buf, size_t count); | ||
755 | |||
731 | /** | 756 | /** |
732 | * struct usbdrv_wrap - wrapper for driver-model structure | 757 | * struct usbdrv_wrap - wrapper for driver-model structure |
733 | * @driver: The driver-model core driver structure. | 758 | * @driver: The driver-model core driver structure. |
@@ -868,10 +893,11 @@ struct usb_class_driver { | |||
868 | * use these in module_init()/module_exit() | 893 | * use these in module_init()/module_exit() |
869 | * and don't forget MODULE_DEVICE_TABLE(usb, ...) | 894 | * and don't forget MODULE_DEVICE_TABLE(usb, ...) |
870 | */ | 895 | */ |
871 | extern int usb_register_driver(struct usb_driver *, struct module *); | 896 | extern int usb_register_driver(struct usb_driver *, struct module *, |
897 | const char *); | ||
872 | static inline int usb_register(struct usb_driver *driver) | 898 | static inline int usb_register(struct usb_driver *driver) |
873 | { | 899 | { |
874 | return usb_register_driver(driver, THIS_MODULE); | 900 | return usb_register_driver(driver, THIS_MODULE, KBUILD_MODNAME); |
875 | } | 901 | } |
876 | extern void usb_deregister(struct usb_driver *); | 902 | extern void usb_deregister(struct usb_driver *); |
877 | 903 | ||
@@ -1085,7 +1111,6 @@ struct urb | |||
1085 | struct kref kref; /* reference count of the URB */ | 1111 | struct kref kref; /* reference count of the URB */ |
1086 | spinlock_t lock; /* lock for the URB */ | 1112 | spinlock_t lock; /* lock for the URB */ |
1087 | void *hcpriv; /* private data for host controller */ | 1113 | void *hcpriv; /* private data for host controller */ |
1088 | int bandwidth; /* bandwidth for INT/ISO request */ | ||
1089 | atomic_t use_count; /* concurrent submissions counter */ | 1114 | atomic_t use_count; /* concurrent submissions counter */ |
1090 | u8 reject; /* submissions will fail */ | 1115 | u8 reject; /* submissions will fail */ |
1091 | 1116 | ||
diff --git a/include/linux/usb/Kbuild b/include/linux/usb/Kbuild new file mode 100644 index 000000000000..43f160cfe003 --- /dev/null +++ b/include/linux/usb/Kbuild | |||
@@ -0,0 +1,5 @@ | |||
1 | unifdef-y += audio.h | ||
2 | unifdef-y += cdc.h | ||
3 | unifdef-y += ch9.h | ||
4 | unifdef-y += midi.h | ||
5 | |||
diff --git a/include/linux/usb_ch9.h b/include/linux/usb/ch9.h index c720d107ff29..ae7833749fa2 100644 --- a/include/linux/usb_ch9.h +++ b/include/linux/usb/ch9.h | |||
@@ -224,6 +224,7 @@ struct usb_device_descriptor { | |||
224 | #define USB_CLASS_CONTENT_SEC 0x0d /* content security */ | 224 | #define USB_CLASS_CONTENT_SEC 0x0d /* content security */ |
225 | #define USB_CLASS_VIDEO 0x0e | 225 | #define USB_CLASS_VIDEO 0x0e |
226 | #define USB_CLASS_WIRELESS_CONTROLLER 0xe0 | 226 | #define USB_CLASS_WIRELESS_CONTROLLER 0xe0 |
227 | #define USB_CLASS_MISC 0xef | ||
227 | #define USB_CLASS_APP_SPEC 0xfe | 228 | #define USB_CLASS_APP_SPEC 0xfe |
228 | #define USB_CLASS_VENDOR_SPEC 0xff | 229 | #define USB_CLASS_VENDOR_SPEC 0xff |
229 | 230 | ||
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h index 10f99e5f1a97..33dcd8576696 100644 --- a/include/linux/usb/serial.h +++ b/include/linux/usb/serial.h | |||
@@ -179,6 +179,9 @@ static inline void usb_set_serial_data (struct usb_serial *serial, void *data) | |||
179 | * memory structure allocation at this point in time. | 179 | * memory structure allocation at this point in time. |
180 | * @shutdown: pointer to the driver's shutdown function. This will be | 180 | * @shutdown: pointer to the driver's shutdown function. This will be |
181 | * called when the device is removed from the system. | 181 | * called when the device is removed from the system. |
182 | * @usb_driver: pointer to the struct usb_driver that controls this | ||
183 | * device. This is necessary to allow dynamic ids to be added to | ||
184 | * the driver from sysfs. | ||
182 | * | 185 | * |
183 | * This structure is defines a USB Serial driver. It provides all of | 186 | * This structure is defines a USB Serial driver. It provides all of |
184 | * the information that the USB serial core code needs. If the function | 187 | * the information that the USB serial core code needs. If the function |
@@ -202,6 +205,8 @@ struct usb_serial_driver { | |||
202 | 205 | ||
203 | struct list_head driver_list; | 206 | struct list_head driver_list; |
204 | struct device_driver driver; | 207 | struct device_driver driver; |
208 | struct usb_driver *usb_driver; | ||
209 | struct usb_dynids dynids; | ||
205 | 210 | ||
206 | int (*probe) (struct usb_serial *serial, const struct usb_device_id *id); | 211 | int (*probe) (struct usb_serial *serial, const struct usb_device_id *id); |
207 | int (*attach) (struct usb_serial *serial); | 212 | int (*attach) (struct usb_serial *serial); |
diff --git a/include/linux/usb_gadgetfs.h b/include/linux/usb_gadgetfs.h index b53d6ae8e55e..8086d5a9b94e 100644 --- a/include/linux/usb_gadgetfs.h +++ b/include/linux/usb_gadgetfs.h | |||
@@ -2,7 +2,7 @@ | |||
2 | #include <asm/types.h> | 2 | #include <asm/types.h> |
3 | #include <asm/ioctl.h> | 3 | #include <asm/ioctl.h> |
4 | 4 | ||
5 | #include <linux/usb_ch9.h> | 5 | #include <linux/usb/ch9.h> |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Filesystem based user-mode API to USB Gadget controller hardware | 8 | * Filesystem based user-mode API to USB Gadget controller hardware |
diff --git a/include/linux/video_output.h b/include/linux/video_output.h new file mode 100644 index 000000000000..e63e0c03ee0d --- /dev/null +++ b/include/linux/video_output.h | |||
@@ -0,0 +1,42 @@ | |||
1 | /* | ||
2 | * | ||
3 | * Copyright (C) 2006 Luming Yu <luming.yu@intel.com> | ||
4 | * | ||
5 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or (at | ||
10 | * your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License along | ||
18 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
19 | * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. | ||
20 | * | ||
21 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
22 | */ | ||
23 | #ifndef _LINUX_VIDEO_OUTPUT_H | ||
24 | #define _LINUX_VIDEO_OUTPUT_H | ||
25 | #include <linux/device.h> | ||
26 | struct output_device; | ||
27 | struct output_properties { | ||
28 | int (*set_state)(struct output_device *); | ||
29 | int (*get_status)(struct output_device *); | ||
30 | }; | ||
31 | struct output_device { | ||
32 | int request_state; | ||
33 | struct output_properties *props; | ||
34 | struct class_device class_dev; | ||
35 | }; | ||
36 | #define to_output_device(obj) container_of(obj, struct output_device, class_dev) | ||
37 | struct output_device *video_output_register(const char *name, | ||
38 | struct device *dev, | ||
39 | void *devdata, | ||
40 | struct output_properties *op); | ||
41 | void video_output_unregister(struct output_device *dev); | ||
42 | #endif | ||