aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/acpi/acpi_bus.h2
-rw-r--r--include/asm-alpha/device.h7
-rw-r--r--include/asm-arm/device.h7
-rw-r--r--include/asm-arm26/device.h7
-rw-r--r--include/asm-avr32/device.h7
-rw-r--r--include/asm-cris/device.h7
-rw-r--r--include/asm-frv/device.h7
-rw-r--r--include/asm-generic/device.h12
-rw-r--r--include/asm-h8300/device.h7
-rw-r--r--include/asm-i386/device.h15
-rw-r--r--include/asm-ia64/device.h15
-rw-r--r--include/asm-m32r/device.h7
-rw-r--r--include/asm-m68k/device.h7
-rw-r--r--include/asm-m68knommu/device.h7
-rw-r--r--include/asm-mips/device.h7
-rw-r--r--include/asm-parisc/device.h7
-rw-r--r--include/asm-powerpc/device.h7
-rw-r--r--include/asm-ppc/device.h7
-rw-r--r--include/asm-s390/device.h7
-rw-r--r--include/asm-sh/device.h7
-rw-r--r--include/asm-sh64/device.h7
-rw-r--r--include/asm-sparc/device.h7
-rw-r--r--include/asm-sparc64/device.h7
-rw-r--r--include/asm-um/device.h7
-rw-r--r--include/asm-v850/device.h7
-rw-r--r--include/asm-x86_64/device.h15
-rw-r--r--include/asm-xtensa/device.h7
-rw-r--r--include/linux/device.h35
-rw-r--r--include/linux/fb.h8
-rw-r--r--include/linux/kobject.h8
-rw-r--r--include/linux/miscdevice.h5
-rw-r--r--include/linux/mmc/host.h8
-rw-r--r--include/linux/module.h1
-rw-r--r--include/linux/platform_device.h6
-rw-r--r--include/linux/sysfs.h8
-rw-r--r--include/linux/tty.h5
-rw-r--r--include/sound/core.h8
37 files changed, 283 insertions, 22 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index f338e40bd54..fdd10953b2b 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -357,7 +357,7 @@ struct device *acpi_get_physical_device(acpi_handle);
357/* helper */ 357/* helper */
358acpi_handle acpi_get_child(acpi_handle, acpi_integer); 358acpi_handle acpi_get_child(acpi_handle, acpi_integer);
359acpi_handle acpi_get_pci_rootbridge_handle(unsigned int, unsigned int); 359acpi_handle acpi_get_pci_rootbridge_handle(unsigned int, unsigned int);
360#define DEVICE_ACPI_HANDLE(dev) ((acpi_handle)((dev)->firmware_data)) 360#define DEVICE_ACPI_HANDLE(dev) ((acpi_handle)((dev)->archdata.acpi_handle))
361 361
362#endif /* CONFIG_ACPI */ 362#endif /* CONFIG_ACPI */
363 363
diff --git a/include/asm-alpha/device.h b/include/asm-alpha/device.h
new file mode 100644
index 00000000000..d8f9872b0e2
--- /dev/null
+++ b/include/asm-alpha/device.h
@@ -0,0 +1,7 @@
1/*
2 * Arch specific extensions to struct device
3 *
4 * This file is released under the GPLv2
5 */
6#include <asm-generic/device.h>
7
diff --git a/include/asm-arm/device.h b/include/asm-arm/device.h
new file mode 100644
index 00000000000..d8f9872b0e2
--- /dev/null
+++ b/include/asm-arm/device.h
@@ -0,0 +1,7 @@
1/*
2 * Arch specific extensions to struct device
3 *
4 * This file is released under the GPLv2
5 */
6#include <asm-generic/device.h>
7
diff --git a/include/asm-arm26/device.h b/include/asm-arm26/device.h
new file mode 100644
index 00000000000..d8f9872b0e2
--- /dev/null
+++ b/include/asm-arm26/device.h
@@ -0,0 +1,7 @@
1/*
2 * Arch specific extensions to struct device
3 *
4 * This file is released under the GPLv2
5 */
6#include <asm-generic/device.h>
7
diff --git a/include/asm-avr32/device.h b/include/asm-avr32/device.h
new file mode 100644
index 00000000000..d8f9872b0e2
--- /dev/null
+++ b/include/asm-avr32/device.h
@@ -0,0 +1,7 @@
1/*
2 * Arch specific extensions to struct device
3 *
4 * This file is released under the GPLv2
5 */
6#include <asm-generic/device.h>
7
diff --git a/include/asm-cris/device.h b/include/asm-cris/device.h
new file mode 100644
index 00000000000..d8f9872b0e2
--- /dev/null
+++ b/include/asm-cris/device.h
@@ -0,0 +1,7 @@
1/*
2 * Arch specific extensions to struct device
3 *
4 * This file is released under the GPLv2
5 */
6#include <asm-generic/device.h>
7
diff --git a/include/asm-frv/device.h b/include/asm-frv/device.h
new file mode 100644
index 00000000000..d8f9872b0e2
--- /dev/null
+++ b/include/asm-frv/device.h
@@ -0,0 +1,7 @@
1/*
2 * Arch specific extensions to struct device
3 *
4 * This file is released under the GPLv2
5 */
6#include <asm-generic/device.h>
7
diff --git a/include/asm-generic/device.h b/include/asm-generic/device.h
new file mode 100644
index 00000000000..c17c9600f22
--- /dev/null
+++ b/include/asm-generic/device.h
@@ -0,0 +1,12 @@
1/*
2 * Arch specific extensions to struct device
3 *
4 * This file is released under the GPLv2
5 */
6#ifndef _ASM_GENERIC_DEVICE_H
7#define _ASM_GENERIC_DEVICE_H
8
9struct dev_archdata {
10};
11
12#endif /* _ASM_GENERIC_DEVICE_H */
diff --git a/include/asm-h8300/device.h b/include/asm-h8300/device.h
new file mode 100644
index 00000000000..d8f9872b0e2
--- /dev/null
+++ b/include/asm-h8300/device.h
@@ -0,0 +1,7 @@
1/*
2 * Arch specific extensions to struct device
3 *
4 * This file is released under the GPLv2
5 */
6#include <asm-generic/device.h>
7
diff --git a/include/asm-i386/device.h b/include/asm-i386/device.h
new file mode 100644
index 00000000000..849604c70e6
--- /dev/null
+++ b/include/asm-i386/device.h
@@ -0,0 +1,15 @@
1/*
2 * Arch specific extensions to struct device
3 *
4 * This file is released under the GPLv2
5 */
6#ifndef _ASM_I386_DEVICE_H
7#define _ASM_I386_DEVICE_H
8
9struct dev_archdata {
10#ifdef CONFIG_ACPI
11 void *acpi_handle;
12#endif
13};
14
15#endif /* _ASM_I386_DEVICE_H */
diff --git a/include/asm-ia64/device.h b/include/asm-ia64/device.h
new file mode 100644
index 00000000000..3db6daf7f25
--- /dev/null
+++ b/include/asm-ia64/device.h
@@ -0,0 +1,15 @@
1/*
2 * Arch specific extensions to struct device
3 *
4 * This file is released under the GPLv2
5 */
6#ifndef _ASM_IA64_DEVICE_H
7#define _ASM_IA64_DEVICE_H
8
9struct dev_archdata {
10#ifdef CONFIG_ACPI
11 void *acpi_handle;
12#endif
13};
14
15#endif /* _ASM_IA64_DEVICE_H */
diff --git a/include/asm-m32r/device.h b/include/asm-m32r/device.h
new file mode 100644
index 00000000000..d8f9872b0e2
--- /dev/null
+++ b/include/asm-m32r/device.h
@@ -0,0 +1,7 @@
1/*
2 * Arch specific extensions to struct device
3 *
4 * This file is released under the GPLv2
5 */
6#include <asm-generic/device.h>
7
diff --git a/include/asm-m68k/device.h b/include/asm-m68k/device.h
new file mode 100644
index 00000000000..d8f9872b0e2
--- /dev/null
+++ b/include/asm-m68k/device.h
@@ -0,0 +1,7 @@
1/*
2 * Arch specific extensions to struct device
3 *
4 * This file is released under the GPLv2
5 */
6#include <asm-generic/device.h>
7
diff --git a/include/asm-m68knommu/device.h b/include/asm-m68knommu/device.h
new file mode 100644
index 00000000000..d8f9872b0e2
--- /dev/null
+++ b/include/asm-m68knommu/device.h
@@ -0,0 +1,7 @@
1/*
2 * Arch specific extensions to struct device
3 *
4 * This file is released under the GPLv2
5 */
6#include <asm-generic/device.h>
7
diff --git a/include/asm-mips/device.h b/include/asm-mips/device.h
new file mode 100644
index 00000000000..d8f9872b0e2
--- /dev/null
+++ b/include/asm-mips/device.h
@@ -0,0 +1,7 @@
1/*
2 * Arch specific extensions to struct device
3 *
4 * This file is released under the GPLv2
5 */
6#include <asm-generic/device.h>
7
diff --git a/include/asm-parisc/device.h b/include/asm-parisc/device.h
new file mode 100644
index 00000000000..d8f9872b0e2
--- /dev/null
+++ b/include/asm-parisc/device.h
@@ -0,0 +1,7 @@
1/*
2 * Arch specific extensions to struct device
3 *
4 * This file is released under the GPLv2
5 */
6#include <asm-generic/device.h>
7
diff --git a/include/asm-powerpc/device.h b/include/asm-powerpc/device.h
new file mode 100644
index 00000000000..d8f9872b0e2
--- /dev/null
+++ b/include/asm-powerpc/device.h
@@ -0,0 +1,7 @@
1/*
2 * Arch specific extensions to struct device
3 *
4 * This file is released under the GPLv2
5 */
6#include <asm-generic/device.h>
7
diff --git a/include/asm-ppc/device.h b/include/asm-ppc/device.h
new file mode 100644
index 00000000000..d8f9872b0e2
--- /dev/null
+++ b/include/asm-ppc/device.h
@@ -0,0 +1,7 @@
1/*
2 * Arch specific extensions to struct device
3 *
4 * This file is released under the GPLv2
5 */
6#include <asm-generic/device.h>
7
diff --git a/include/asm-s390/device.h b/include/asm-s390/device.h
new file mode 100644
index 00000000000..d8f9872b0e2
--- /dev/null
+++ b/include/asm-s390/device.h
@@ -0,0 +1,7 @@
1/*
2 * Arch specific extensions to struct device
3 *
4 * This file is released under the GPLv2
5 */
6#include <asm-generic/device.h>
7
diff --git a/include/asm-sh/device.h b/include/asm-sh/device.h
new file mode 100644
index 00000000000..d8f9872b0e2
--- /dev/null
+++ b/include/asm-sh/device.h
@@ -0,0 +1,7 @@
1/*
2 * Arch specific extensions to struct device
3 *
4 * This file is released under the GPLv2
5 */
6#include <asm-generic/device.h>
7
diff --git a/include/asm-sh64/device.h b/include/asm-sh64/device.h
new file mode 100644
index 00000000000..d8f9872b0e2
--- /dev/null
+++ b/include/asm-sh64/device.h
@@ -0,0 +1,7 @@
1/*
2 * Arch specific extensions to struct device
3 *
4 * This file is released under the GPLv2
5 */
6#include <asm-generic/device.h>
7
diff --git a/include/asm-sparc/device.h b/include/asm-sparc/device.h
new file mode 100644
index 00000000000..d8f9872b0e2
--- /dev/null
+++ b/include/asm-sparc/device.h
@@ -0,0 +1,7 @@
1/*
2 * Arch specific extensions to struct device
3 *
4 * This file is released under the GPLv2
5 */
6#include <asm-generic/device.h>
7
diff --git a/include/asm-sparc64/device.h b/include/asm-sparc64/device.h
new file mode 100644
index 00000000000..d8f9872b0e2
--- /dev/null
+++ b/include/asm-sparc64/device.h
@@ -0,0 +1,7 @@
1/*
2 * Arch specific extensions to struct device
3 *
4 * This file is released under the GPLv2
5 */
6#include <asm-generic/device.h>
7
diff --git a/include/asm-um/device.h b/include/asm-um/device.h
new file mode 100644
index 00000000000..d8f9872b0e2
--- /dev/null
+++ b/include/asm-um/device.h
@@ -0,0 +1,7 @@
1/*
2 * Arch specific extensions to struct device
3 *
4 * This file is released under the GPLv2
5 */
6#include <asm-generic/device.h>
7
diff --git a/include/asm-v850/device.h b/include/asm-v850/device.h
new file mode 100644
index 00000000000..d8f9872b0e2
--- /dev/null
+++ b/include/asm-v850/device.h
@@ -0,0 +1,7 @@
1/*
2 * Arch specific extensions to struct device
3 *
4 * This file is released under the GPLv2
5 */
6#include <asm-generic/device.h>
7
diff --git a/include/asm-x86_64/device.h b/include/asm-x86_64/device.h
new file mode 100644
index 00000000000..3afa03f33a3
--- /dev/null
+++ b/include/asm-x86_64/device.h
@@ -0,0 +1,15 @@
1/*
2 * Arch specific extensions to struct device
3 *
4 * This file is released under the GPLv2
5 */
6#ifndef _ASM_X86_64_DEVICE_H
7#define _ASM_X86_64_DEVICE_H
8
9struct dev_archdata {
10#ifdef CONFIG_ACPI
11 void *acpi_handle;
12#endif
13};
14
15#endif /* _ASM_X86_64_DEVICE_H */
diff --git a/include/asm-xtensa/device.h b/include/asm-xtensa/device.h
new file mode 100644
index 00000000000..d8f9872b0e2
--- /dev/null
+++ b/include/asm-xtensa/device.h
@@ -0,0 +1,7 @@
1/*
2 * Arch specific extensions to struct device
3 *
4 * This file is released under the GPLv2
5 */
6#include <asm-generic/device.h>
7
diff --git a/include/linux/device.h b/include/linux/device.h
index 9d4f6a96393..583a341e016 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -21,6 +21,7 @@
21#include <linux/pm.h> 21#include <linux/pm.h>
22#include <asm/semaphore.h> 22#include <asm/semaphore.h>
23#include <asm/atomic.h> 23#include <asm/atomic.h>
24#include <asm/device.h>
24 25
25#define DEVICE_NAME_SIZE 50 26#define DEVICE_NAME_SIZE 50
26#define DEVICE_NAME_HALF __stringify(20) /* Less than half to accommodate slop */ 27#define DEVICE_NAME_HALF __stringify(20) /* Less than half to accommodate slop */
@@ -42,6 +43,8 @@ struct bus_type {
42 struct klist klist_devices; 43 struct klist klist_devices;
43 struct klist klist_drivers; 44 struct klist klist_drivers;
44 45
46 struct blocking_notifier_head bus_notifier;
47
45 struct bus_attribute * bus_attrs; 48 struct bus_attribute * bus_attrs;
46 struct device_attribute * dev_attrs; 49 struct device_attribute * dev_attrs;
47 struct driver_attribute * drv_attrs; 50 struct driver_attribute * drv_attrs;
@@ -75,6 +78,29 @@ int __must_check bus_for_each_drv(struct bus_type *bus,
75 struct device_driver *start, void *data, 78 struct device_driver *start, void *data,
76 int (*fn)(struct device_driver *, void *)); 79 int (*fn)(struct device_driver *, void *));
77 80
81/*
82 * Bus notifiers: Get notified of addition/removal of devices
83 * and binding/unbinding of drivers to devices.
84 * In the long run, it should be a replacement for the platform
85 * notify hooks.
86 */
87struct notifier_block;
88
89extern int bus_register_notifier(struct bus_type *bus,
90 struct notifier_block *nb);
91extern int bus_unregister_notifier(struct bus_type *bus,
92 struct notifier_block *nb);
93
94/* All 4 notifers below get called with the target struct device *
95 * as an argument. Note that those functions are likely to be called
96 * with the device semaphore held in the core, so be careful.
97 */
98#define BUS_NOTIFY_ADD_DEVICE 0x00000001 /* device added */
99#define BUS_NOTIFY_DEL_DEVICE 0x00000002 /* device removed */
100#define BUS_NOTIFY_BOUND_DRIVER 0x00000003 /* driver bound to device */
101#define BUS_NOTIFY_UNBIND_DRIVER 0x00000004 /* driver about to be
102 unbound */
103
78/* driverfs interface for exporting bus attributes */ 104/* driverfs interface for exporting bus attributes */
79 105
80struct bus_attribute { 106struct bus_attribute {
@@ -343,8 +369,6 @@ struct device {
343 void *driver_data; /* data private to the driver */ 369 void *driver_data; /* data private to the driver */
344 void *platform_data; /* Platform specific data, device 370 void *platform_data; /* Platform specific data, device
345 core doesn't touch it */ 371 core doesn't touch it */
346 void *firmware_data; /* Firmware specific data (e.g. ACPI,
347 BIOS data),reserved for device core*/
348 struct dev_pm_info power; 372 struct dev_pm_info power;
349 373
350 u64 *dma_mask; /* dma mask (if dma'able device) */ 374 u64 *dma_mask; /* dma mask (if dma'able device) */
@@ -358,6 +382,8 @@ struct device {
358 382
359 struct dma_coherent_mem *dma_mem; /* internal for coherent mem 383 struct dma_coherent_mem *dma_mem; /* internal for coherent mem
360 override */ 384 override */
385 /* arch specific additions */
386 struct dev_archdata archdata;
361 387
362 /* class_device migration path */ 388 /* class_device migration path */
363 struct list_head node; 389 struct list_head node;
@@ -395,7 +421,10 @@ extern int __must_check device_add(struct device * dev);
395extern void device_del(struct device * dev); 421extern void device_del(struct device * dev);
396extern int device_for_each_child(struct device *, void *, 422extern int device_for_each_child(struct device *, void *,
397 int (*fn)(struct device *, void *)); 423 int (*fn)(struct device *, void *));
424extern struct device *device_find_child(struct device *, void *data,
425 int (*match)(struct device *, void *));
398extern int device_rename(struct device *dev, char *new_name); 426extern int device_rename(struct device *dev, char *new_name);
427extern int device_move(struct device *dev, struct device *new_parent);
399 428
400/* 429/*
401 * Manual binding of a device to driver. See drivers/base/bus.c 430 * Manual binding of a device to driver. See drivers/base/bus.c
@@ -415,8 +444,6 @@ extern struct device *device_create(struct class *cls, struct device *parent,
415 __attribute__((format(printf,4,5))); 444 __attribute__((format(printf,4,5)));
416extern void device_destroy(struct class *cls, dev_t devt); 445extern void device_destroy(struct class *cls, dev_t devt);
417 446
418extern int virtual_device_parent(struct device *dev);
419
420/* 447/*
421 * Platform "fixup" functions - allow the platform to have their say 448 * Platform "fixup" functions - allow the platform to have their say
422 * about devices and actions that the general device layer doesn't 449 * about devices and actions that the general device layer doesn't
diff --git a/include/linux/fb.h b/include/linux/fb.h
index 3e69241e6a8..fa23e0671bb 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -774,8 +774,8 @@ struct fb_info {
774#endif 774#endif
775 775
776 struct fb_ops *fbops; 776 struct fb_ops *fbops;
777 struct device *device; 777 struct device *device; /* This is the parent */
778 struct class_device *class_device; /* sysfs per device attrs */ 778 struct device *dev; /* This is this fb device */
779 int class_flag; /* private sysfs flags */ 779 int class_flag; /* private sysfs flags */
780#ifdef CONFIG_FB_TILEBLITTING 780#ifdef CONFIG_FB_TILEBLITTING
781 struct fb_tile_ops *tileops; /* Tile Blitting */ 781 struct fb_tile_ops *tileops; /* Tile Blitting */
@@ -910,8 +910,8 @@ static inline void __fb_pad_aligned_buffer(u8 *dst, u32 d_pitch,
910/* drivers/video/fbsysfs.c */ 910/* drivers/video/fbsysfs.c */
911extern struct fb_info *framebuffer_alloc(size_t size, struct device *dev); 911extern struct fb_info *framebuffer_alloc(size_t size, struct device *dev);
912extern void framebuffer_release(struct fb_info *info); 912extern void framebuffer_release(struct fb_info *info);
913extern int fb_init_class_device(struct fb_info *fb_info); 913extern int fb_init_device(struct fb_info *fb_info);
914extern void fb_cleanup_class_device(struct fb_info *head); 914extern void fb_cleanup_device(struct fb_info *head);
915extern void fb_bl_default_curve(struct fb_info *fb_info, u8 off, u8 min, u8 max); 915extern void fb_bl_default_curve(struct fb_info *fb_info, u8 off, u8 min, u8 max);
916 916
917/* drivers/video/fbmon.c */ 917/* drivers/video/fbmon.c */
diff --git a/include/linux/kobject.h b/include/linux/kobject.h
index bcd9cd173c2..d1c8d28fa92 100644
--- a/include/linux/kobject.h
+++ b/include/linux/kobject.h
@@ -47,6 +47,7 @@ enum kobject_action {
47 KOBJ_UMOUNT = (__force kobject_action_t) 0x05, /* umount event for block devices (broken) */ 47 KOBJ_UMOUNT = (__force kobject_action_t) 0x05, /* umount event for block devices (broken) */
48 KOBJ_OFFLINE = (__force kobject_action_t) 0x06, /* device offline */ 48 KOBJ_OFFLINE = (__force kobject_action_t) 0x06, /* device offline */
49 KOBJ_ONLINE = (__force kobject_action_t) 0x07, /* device online */ 49 KOBJ_ONLINE = (__force kobject_action_t) 0x07, /* device online */
50 KOBJ_MOVE = (__force kobject_action_t) 0x08, /* device move */
50}; 51};
51 52
52struct kobject { 53struct kobject {
@@ -76,6 +77,7 @@ extern int __must_check kobject_add(struct kobject *);
76extern void kobject_del(struct kobject *); 77extern void kobject_del(struct kobject *);
77 78
78extern int __must_check kobject_rename(struct kobject *, const char *new_name); 79extern int __must_check kobject_rename(struct kobject *, const char *new_name);
80extern int __must_check kobject_move(struct kobject *, struct kobject *);
79 81
80extern int __must_check kobject_register(struct kobject *); 82extern int __must_check kobject_register(struct kobject *);
81extern void kobject_unregister(struct kobject *); 83extern void kobject_unregister(struct kobject *);
@@ -264,6 +266,8 @@ extern int __must_check subsys_create_file(struct subsystem * ,
264 266
265#if defined(CONFIG_HOTPLUG) 267#if defined(CONFIG_HOTPLUG)
266void kobject_uevent(struct kobject *kobj, enum kobject_action action); 268void kobject_uevent(struct kobject *kobj, enum kobject_action action);
269void kobject_uevent_env(struct kobject *kobj, enum kobject_action action,
270 char *envp[]);
267 271
268int add_uevent_var(char **envp, int num_envp, int *cur_index, 272int add_uevent_var(char **envp, int num_envp, int *cur_index,
269 char *buffer, int buffer_size, int *cur_len, 273 char *buffer, int buffer_size, int *cur_len,
@@ -271,6 +275,10 @@ int add_uevent_var(char **envp, int num_envp, int *cur_index,
271 __attribute__((format (printf, 7, 8))); 275 __attribute__((format (printf, 7, 8)));
272#else 276#else
273static inline void kobject_uevent(struct kobject *kobj, enum kobject_action action) { } 277static inline void kobject_uevent(struct kobject *kobj, enum kobject_action action) { }
278static inline void kobject_uevent_env(struct kobject *kobj,
279 enum kobject_action action,
280 char *envp[])
281{ }
274 282
275static inline int add_uevent_var(char **envp, int num_envp, int *cur_index, 283static inline int add_uevent_var(char **envp, int num_envp, int *cur_index,
276 char *buffer, int buffer_size, int *cur_len, 284 char *buffer, int buffer_size, int *cur_len,
diff --git a/include/linux/miscdevice.h b/include/linux/miscdevice.h
index b03cfb91e22..326da7d500c 100644
--- a/include/linux/miscdevice.h
+++ b/include/linux/miscdevice.h
@@ -31,15 +31,14 @@
31#define HPET_MINOR 228 31#define HPET_MINOR 228
32 32
33struct device; 33struct device;
34struct class_device;
35 34
36struct miscdevice { 35struct miscdevice {
37 int minor; 36 int minor;
38 const char *name; 37 const char *name;
39 const struct file_operations *fops; 38 const struct file_operations *fops;
40 struct list_head list; 39 struct list_head list;
41 struct device *dev; 40 struct device *parent;
42 struct class_device *class; 41 struct device *this_device;
43}; 42};
44 43
45extern int misc_register(struct miscdevice * misc); 44extern int misc_register(struct miscdevice * misc);
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index 587264a58d5..528e7d3fecb 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -74,8 +74,8 @@ struct mmc_card;
74struct device; 74struct device;
75 75
76struct mmc_host { 76struct mmc_host {
77 struct device *dev; 77 struct device *parent;
78 struct class_device class_dev; 78 struct device class_dev;
79 int index; 79 int index;
80 const struct mmc_host_ops *ops; 80 const struct mmc_host_ops *ops;
81 unsigned int f_min; 81 unsigned int f_min;
@@ -125,8 +125,8 @@ static inline void *mmc_priv(struct mmc_host *host)
125 return (void *)host->private; 125 return (void *)host->private;
126} 126}
127 127
128#define mmc_dev(x) ((x)->dev) 128#define mmc_dev(x) ((x)->parent)
129#define mmc_hostname(x) ((x)->class_dev.class_id) 129#define mmc_hostname(x) ((x)->class_dev.bus_id)
130 130
131extern int mmc_suspend_host(struct mmc_host *, pm_message_t); 131extern int mmc_suspend_host(struct mmc_host *, pm_message_t);
132extern int mmc_resume_host(struct mmc_host *); 132extern int mmc_resume_host(struct mmc_host *);
diff --git a/include/linux/module.h b/include/linux/module.h
index d1d00ce8f4e..9258ffd8a7f 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -264,6 +264,7 @@ struct module
264 struct module_attribute *modinfo_attrs; 264 struct module_attribute *modinfo_attrs;
265 const char *version; 265 const char *version;
266 const char *srcversion; 266 const char *srcversion;
267 struct kobject *drivers_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/platform_device.h b/include/linux/platform_device.h
index 29cd6dee13d..20f47b81d3f 100644
--- a/include/linux/platform_device.h
+++ b/include/linux/platform_device.h
@@ -58,6 +58,12 @@ struct platform_driver {
58extern int platform_driver_register(struct platform_driver *); 58extern int platform_driver_register(struct platform_driver *);
59extern void platform_driver_unregister(struct platform_driver *); 59extern void platform_driver_unregister(struct platform_driver *);
60 60
61/* non-hotpluggable platform devices may use this so that probe() and
62 * its support may live in __init sections, conserving runtime memory.
63 */
64extern int platform_driver_probe(struct platform_driver *driver,
65 int (*probe)(struct platform_device *));
66
61#define platform_get_drvdata(_dev) dev_get_drvdata(&(_dev)->dev) 67#define platform_get_drvdata(_dev) dev_get_drvdata(&(_dev)->dev)
62#define platform_set_drvdata(_dev,data) dev_set_drvdata(&(_dev)->dev, (data)) 68#define platform_set_drvdata(_dev,data) dev_set_drvdata(&(_dev)->dev, (data))
63 69
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h
index 6d5c43d31de..2129d1b6c87 100644
--- a/include/linux/sysfs.h
+++ b/include/linux/sysfs.h
@@ -97,6 +97,9 @@ extern int __must_check
97sysfs_rename_dir(struct kobject *, const char *new_name); 97sysfs_rename_dir(struct kobject *, const char *new_name);
98 98
99extern int __must_check 99extern int __must_check
100sysfs_move_dir(struct kobject *, struct kobject *);
101
102extern int __must_check
100sysfs_create_file(struct kobject *, const struct attribute *); 103sysfs_create_file(struct kobject *, const struct attribute *);
101 104
102extern int __must_check 105extern int __must_check
@@ -142,6 +145,11 @@ static inline int sysfs_rename_dir(struct kobject * k, const char *new_name)
142 return 0; 145 return 0;
143} 146}
144 147
148static inline int sysfs_move_dir(struct kobject * k, struct kobject * new_parent)
149{
150 return 0;
151}
152
145static inline int sysfs_create_file(struct kobject * k, const struct attribute * a) 153static inline int sysfs_create_file(struct kobject * k, const struct attribute * a)
146{ 154{
147 return 0; 155 return 0;
diff --git a/include/linux/tty.h b/include/linux/tty.h
index 44091c0db0b..65321f911c1 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -276,9 +276,8 @@ extern int tty_register_ldisc(int disc, struct tty_ldisc *new_ldisc);
276extern int tty_unregister_ldisc(int disc); 276extern int tty_unregister_ldisc(int disc);
277extern int tty_register_driver(struct tty_driver *driver); 277extern int tty_register_driver(struct tty_driver *driver);
278extern int tty_unregister_driver(struct tty_driver *driver); 278extern int tty_unregister_driver(struct tty_driver *driver);
279extern struct class_device *tty_register_device(struct tty_driver *driver, 279extern struct device *tty_register_device(struct tty_driver *driver,
280 unsigned index, 280 unsigned index, struct device *dev);
281 struct device *dev);
282extern void tty_unregister_device(struct tty_driver *driver, unsigned index); 281extern void tty_unregister_device(struct tty_driver *driver, unsigned index);
283extern int tty_read_raw_data(struct tty_struct *tty, unsigned char *bufp, 282extern int tty_read_raw_data(struct tty_struct *tty, unsigned char *bufp,
284 int buflen); 283 int buflen);
diff --git a/include/sound/core.h b/include/sound/core.h
index fa1ca0127ba..a994bea09cd 100644
--- a/include/sound/core.h
+++ b/include/sound/core.h
@@ -132,6 +132,7 @@ struct snd_card {
132 int shutdown; /* this card is going down */ 132 int shutdown; /* this card is going down */
133 int free_on_last_close; /* free in context of file_release */ 133 int free_on_last_close; /* free in context of file_release */
134 wait_queue_head_t shutdown_sleep; 134 wait_queue_head_t shutdown_sleep;
135 struct device *parent;
135 struct device *dev; 136 struct device *dev;
136 137
137#ifdef CONFIG_PM 138#ifdef CONFIG_PM
@@ -187,13 +188,14 @@ struct snd_minor {
187 int device; /* device number */ 188 int device; /* device number */
188 const struct file_operations *f_ops; /* file operations */ 189 const struct file_operations *f_ops; /* file operations */
189 void *private_data; /* private data for f_ops->open */ 190 void *private_data; /* private data for f_ops->open */
190 struct class_device *class_dev; /* class device for sysfs */ 191 struct device *dev; /* device for sysfs */
191}; 192};
192 193
193/* sound.c */ 194/* sound.c */
194 195
195extern int snd_major; 196extern int snd_major;
196extern int snd_ecards_limit; 197extern int snd_ecards_limit;
198extern struct class *sound_class;
197 199
198void snd_request_card(int card); 200void snd_request_card(int card);
199 201
@@ -203,7 +205,7 @@ int snd_register_device(int type, struct snd_card *card, int dev,
203int snd_unregister_device(int type, struct snd_card *card, int dev); 205int snd_unregister_device(int type, struct snd_card *card, int dev);
204void *snd_lookup_minor_data(unsigned int minor, int type); 206void *snd_lookup_minor_data(unsigned int minor, int type);
205int snd_add_device_sysfs_file(int type, struct snd_card *card, int dev, 207int snd_add_device_sysfs_file(int type, struct snd_card *card, int dev,
206 const struct class_device_attribute *attr); 208 struct device_attribute *attr);
207 209
208#ifdef CONFIG_SND_OSSEMUL 210#ifdef CONFIG_SND_OSSEMUL
209int snd_register_oss_device(int type, struct snd_card *card, int dev, 211int snd_register_oss_device(int type, struct snd_card *card, int dev,
@@ -255,7 +257,7 @@ int snd_card_file_add(struct snd_card *card, struct file *file);
255int snd_card_file_remove(struct snd_card *card, struct file *file); 257int snd_card_file_remove(struct snd_card *card, struct file *file);
256 258
257#ifndef snd_card_set_dev 259#ifndef snd_card_set_dev
258#define snd_card_set_dev(card,devptr) ((card)->dev = (devptr)) 260#define snd_card_set_dev(card,devptr) ((card)->parent = (devptr))
259#endif 261#endif
260 262
261/* device.c */ 263/* device.c */