Add some auxiliary types for device driver support.

MFC after:	1 week
This commit is contained in:
Mark Johnston 2017-07-04 01:23:36 +00:00
parent 6373e95eb6
commit 88156ba581
2 changed files with 13 additions and 1 deletions

View File

@ -79,6 +79,15 @@ struct dev_pm_ops {
int (*runtime_idle)(struct device *dev);
};
struct device_driver {
const char *name;
const struct dev_pm_ops *pm;
};
struct device_type {
const char *name;
};
struct device {
struct device *parent;
struct list_head irqents;
@ -91,6 +100,8 @@ struct device {
* done somewhere else.
*/
bool bsddev_attached_here;
struct device_driver *driver;
struct device_type *type;
dev_t devt;
struct class *class;
void (*release)(struct device *dev);

View File

@ -185,7 +185,8 @@ struct pci_driver {
void (*shutdown) (struct pci_dev *dev); /* Device shutdown */
driver_t bsddriver;
devclass_t bsdclass;
const struct pci_error_handlers *err_handler;
struct device_driver driver;
const struct pci_error_handlers *err_handler;
};
extern struct list_head pci_drivers;