aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-09-16 11:27:10 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-16 11:27:10 -0400
commitab86e5765d41a5eb4239a1c04d613db87bea5ed8 (patch)
treea41224d4874c2f90e0b423786f00bedf6f3e8bfa /include
parent7ea61767e41e2baedd6a968d13f56026522e1207 (diff)
parent2b2af54a5bb6f7e80ccf78f20084b93c398c3a8b (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: Driver Core: devtmpfs - kernel-maintained tmpfs-based /dev debugfs: Modify default debugfs directory for debugging pktcdvd. debugfs: Modified default dir of debugfs for debugging UHCI. debugfs: Change debugfs directory of IWMC3200 debugfs: Change debuhgfs directory of trace-events-sample.h debugfs: Fix mount directory of debugfs by default in events.txt hpilo: add poll f_op hpilo: add interrupt handler hpilo: staging for interrupt handling driver core: platform_device_add_data(): use kmemdup() Driver core: Add support for compatibility classes uio: add generic driver for PCI 2.3 devices driver-core: move dma-coherent.c from kernel to driver/base mem_class: fix bug mem_class: use minor as index instead of searching the array driver model: constify attribute groups UIO: remove 'default n' from Kconfig Driver core: Add accessor for device platform data Driver core: move dev_get/set_drvdata to drivers/base/dd.c Driver core: add new device to bus's list before probing
Diffstat (limited to 'include')
-rw-r--r--include/linux/attribute_container.h2
-rw-r--r--include/linux/device.h45
-rw-r--r--include/linux/netdevice.h2
-rw-r--r--include/linux/pci_regs.h1
-rw-r--r--include/linux/shmem_fs.h3
-rw-r--r--include/linux/transport_class.h2
6 files changed, 37 insertions, 18 deletions
diff --git a/include/linux/attribute_container.h b/include/linux/attribute_container.h
index 794ad74b1d61..c3ab81428c66 100644
--- a/include/linux/attribute_container.h
+++ b/include/linux/attribute_container.h
@@ -17,7 +17,7 @@ struct attribute_container {
17 struct list_head node; 17 struct list_head node;
18 struct klist containers; 18 struct klist containers;
19 struct class *class; 19 struct class *class;
20 struct attribute_group *grp; 20 const struct attribute_group *grp;
21 struct device_attribute **attrs; 21 struct device_attribute **attrs;
22 int (*match)(struct attribute_container *, struct device *); 22 int (*match)(struct attribute_container *, struct device *);
23#define ATTRIBUTE_CONTAINER_NO_CLASSDEVS 0x01 23#define ATTRIBUTE_CONTAINER_NO_CLASSDEVS 0x01
diff --git a/include/linux/device.h b/include/linux/device.h
index a28642975053..847b763e40e9 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -2,7 +2,8 @@
2 * device.h - generic, centralized driver model 2 * device.h - generic, centralized driver model
3 * 3 *
4 * Copyright (c) 2001-2003 Patrick Mochel <mochel@osdl.org> 4 * Copyright (c) 2001-2003 Patrick Mochel <mochel@osdl.org>
5 * Copyright (c) 2004-2007 Greg Kroah-Hartman <gregkh@suse.de> 5 * Copyright (c) 2004-2009 Greg Kroah-Hartman <gregkh@suse.de>
6 * Copyright (c) 2008-2009 Novell Inc.
6 * 7 *
7 * This file is released under the GPLv2 8 * This file is released under the GPLv2
8 * 9 *
@@ -130,7 +131,7 @@ struct device_driver {
130 void (*shutdown) (struct device *dev); 131 void (*shutdown) (struct device *dev);
131 int (*suspend) (struct device *dev, pm_message_t state); 132 int (*suspend) (struct device *dev, pm_message_t state);
132 int (*resume) (struct device *dev); 133 int (*resume) (struct device *dev);
133 struct attribute_group **groups; 134 const struct attribute_group **groups;
134 135
135 const struct dev_pm_ops *pm; 136 const struct dev_pm_ops *pm;
136 137
@@ -224,6 +225,14 @@ extern void class_unregister(struct class *class);
224 __class_register(class, &__key); \ 225 __class_register(class, &__key); \
225}) 226})
226 227
228struct class_compat;
229struct class_compat *class_compat_register(const char *name);
230void class_compat_unregister(struct class_compat *cls);
231int class_compat_create_link(struct class_compat *cls, struct device *dev,
232 struct device *device_link);
233void class_compat_remove_link(struct class_compat *cls, struct device *dev,
234 struct device *device_link);
235
227extern void class_dev_iter_init(struct class_dev_iter *iter, 236extern void class_dev_iter_init(struct class_dev_iter *iter,
228 struct class *class, 237 struct class *class,
229 struct device *start, 238 struct device *start,
@@ -287,7 +296,7 @@ extern void class_destroy(struct class *cls);
287 */ 296 */
288struct device_type { 297struct device_type {
289 const char *name; 298 const char *name;
290 struct attribute_group **groups; 299 const struct attribute_group **groups;
291 int (*uevent)(struct device *dev, struct kobj_uevent_env *env); 300 int (*uevent)(struct device *dev, struct kobj_uevent_env *env);
292 char *(*nodename)(struct device *dev); 301 char *(*nodename)(struct device *dev);
293 void (*release)(struct device *dev); 302 void (*release)(struct device *dev);
@@ -381,7 +390,6 @@ struct device {
381 struct bus_type *bus; /* type of bus device is on */ 390 struct bus_type *bus; /* type of bus device is on */
382 struct device_driver *driver; /* which driver has allocated this 391 struct device_driver *driver; /* which driver has allocated this
383 device */ 392 device */
384 void *driver_data; /* data private to the driver */
385 void *platform_data; /* Platform specific data, device 393 void *platform_data; /* Platform specific data, device
386 core doesn't touch it */ 394 core doesn't touch it */
387 struct dev_pm_info power; 395 struct dev_pm_info power;
@@ -412,7 +420,7 @@ struct device {
412 420
413 struct klist_node knode_class; 421 struct klist_node knode_class;
414 struct class *class; 422 struct class *class;
415 struct attribute_group **groups; /* optional groups */ 423 const struct attribute_group **groups; /* optional groups */
416 424
417 void (*release)(struct device *dev); 425 void (*release)(struct device *dev);
418}; 426};
@@ -447,16 +455,6 @@ static inline void set_dev_node(struct device *dev, int node)
447} 455}
448#endif 456#endif
449 457
450static inline void *dev_get_drvdata(const struct device *dev)
451{
452 return dev->driver_data;
453}
454
455static inline void dev_set_drvdata(struct device *dev, void *data)
456{
457 dev->driver_data = data;
458}
459
460static inline unsigned int dev_get_uevent_suppress(const struct device *dev) 458static inline unsigned int dev_get_uevent_suppress(const struct device *dev)
461{ 459{
462 return dev->kobj.uevent_suppress; 460 return dev->kobj.uevent_suppress;
@@ -490,6 +488,8 @@ extern int device_rename(struct device *dev, char *new_name);
490extern int device_move(struct device *dev, struct device *new_parent, 488extern int device_move(struct device *dev, struct device *new_parent,
491 enum dpm_order dpm_order); 489 enum dpm_order dpm_order);
492extern const char *device_get_nodename(struct device *dev, const char **tmp); 490extern const char *device_get_nodename(struct device *dev, const char **tmp);
491extern void *dev_get_drvdata(const struct device *dev);
492extern void dev_set_drvdata(struct device *dev, void *data);
493 493
494/* 494/*
495 * Root device objects for grouping under /sys/devices 495 * Root device objects for grouping under /sys/devices
@@ -502,6 +502,11 @@ static inline struct device *root_device_register(const char *name)
502} 502}
503extern void root_device_unregister(struct device *root); 503extern void root_device_unregister(struct device *root);
504 504
505static inline void *dev_get_platdata(const struct device *dev)
506{
507 return dev->platform_data;
508}
509
505/* 510/*
506 * Manual binding of a device to driver. See drivers/base/bus.c 511 * Manual binding of a device to driver. See drivers/base/bus.c
507 * for information on use. 512 * for information on use.
@@ -547,6 +552,16 @@ extern void put_device(struct device *dev);
547 552
548extern void wait_for_device_probe(void); 553extern void wait_for_device_probe(void);
549 554
555#ifdef CONFIG_DEVTMPFS
556extern int devtmpfs_create_node(struct device *dev);
557extern int devtmpfs_delete_node(struct device *dev);
558extern int devtmpfs_mount(const char *mountpoint);
559#else
560static inline int devtmpfs_create_node(struct device *dev) { return 0; }
561static inline int devtmpfs_delete_node(struct device *dev) { return 0; }
562static inline int devtmpfs_mount(const char *mountpoint) { return 0; }
563#endif
564
550/* drivers/base/power/shutdown.c */ 565/* drivers/base/power/shutdown.c */
551extern void device_shutdown(void); 566extern void device_shutdown(void);
552 567
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 65ee1929b2b1..a9aa4b5917d7 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -895,7 +895,7 @@ struct net_device
895 /* class/net/name entry */ 895 /* class/net/name entry */
896 struct device dev; 896 struct device dev;
897 /* space for optional statistics and wireless sysfs groups */ 897 /* space for optional statistics and wireless sysfs groups */
898 struct attribute_group *sysfs_groups[3]; 898 const struct attribute_group *sysfs_groups[3];
899 899
900 /* rtnetlink link ops */ 900 /* rtnetlink link ops */
901 const struct rtnl_link_ops *rtnl_link_ops; 901 const struct rtnl_link_ops *rtnl_link_ops;
diff --git a/include/linux/pci_regs.h b/include/linux/pci_regs.h
index fcaee42c7ac2..dd0bed4f1cf0 100644
--- a/include/linux/pci_regs.h
+++ b/include/linux/pci_regs.h
@@ -42,6 +42,7 @@
42#define PCI_COMMAND_INTX_DISABLE 0x400 /* INTx Emulation Disable */ 42#define PCI_COMMAND_INTX_DISABLE 0x400 /* INTx Emulation Disable */
43 43
44#define PCI_STATUS 0x06 /* 16 bits */ 44#define PCI_STATUS 0x06 /* 16 bits */
45#define PCI_STATUS_INTERRUPT 0x08 /* Interrupt status */
45#define PCI_STATUS_CAP_LIST 0x10 /* Support Capability List */ 46#define PCI_STATUS_CAP_LIST 0x10 /* Support Capability List */
46#define PCI_STATUS_66MHZ 0x20 /* Support 66 Mhz PCI 2.1 bus */ 47#define PCI_STATUS_66MHZ 0x20 /* Support 66 Mhz PCI 2.1 bus */
47#define PCI_STATUS_UDF 0x40 /* Support User Definable Features [obsolete] */ 48#define PCI_STATUS_UDF 0x40 /* Support User Definable Features [obsolete] */
diff --git a/include/linux/shmem_fs.h b/include/linux/shmem_fs.h
index 6d3f2f449ead..deee7afd8d66 100644
--- a/include/linux/shmem_fs.h
+++ b/include/linux/shmem_fs.h
@@ -38,6 +38,9 @@ static inline struct shmem_inode_info *SHMEM_I(struct inode *inode)
38 return container_of(inode, struct shmem_inode_info, vfs_inode); 38 return container_of(inode, struct shmem_inode_info, vfs_inode);
39} 39}
40 40
41extern int init_tmpfs(void);
42extern int shmem_fill_super(struct super_block *sb, void *data, int silent);
43
41#ifdef CONFIG_TMPFS_POSIX_ACL 44#ifdef CONFIG_TMPFS_POSIX_ACL
42int shmem_check_acl(struct inode *, int); 45int shmem_check_acl(struct inode *, int);
43int shmem_acl_init(struct inode *, struct inode *); 46int shmem_acl_init(struct inode *, struct inode *);
diff --git a/include/linux/transport_class.h b/include/linux/transport_class.h
index eaec1ea9558e..9ae8da3e6407 100644
--- a/include/linux/transport_class.h
+++ b/include/linux/transport_class.h
@@ -55,7 +55,7 @@ struct anon_transport_class cls = { \
55 55
56struct transport_container { 56struct transport_container {
57 struct attribute_container ac; 57 struct attribute_container ac;
58 struct attribute_group *statistics; 58 const struct attribute_group *statistics;
59}; 59};
60 60
61#define attribute_container_to_transport_container(x) \ 61#define attribute_container_to_transport_container(x) \