2 * include/asm-sh/bus-sh.h
4 * Copyright (C) 2004 Paul Mundt
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
10 #ifndef __ASM_SH_BUS_SH_H
11 #define __ASM_SH_BUS_SH_H
13 extern struct bus_type sh_bus_types
[];
26 #define to_sh_dev(d) container_of((d), struct sh_dev, dev)
28 #define sh_get_drvdata(d) dev_get_drvdata(&(d)->dev)
29 #define sh_set_drvdata(d,p) dev_set_drvdata(&(d)->dev, (p))
32 struct device_driver drv
;
35 int (*probe
)(struct sh_dev
*);
36 int (*remove
)(struct sh_dev
*);
37 int (*suspend
)(struct sh_dev
*, pm_message_t
);
38 int (*resume
)(struct sh_dev
*);
41 #define to_sh_driver(d) container_of((d), struct sh_driver, drv)
42 #define sh_name(d) ((d)->dev.driver->name)
45 * Device ID numbers for bus types
52 #define SH_BUS_NAME_VIRT "shbus"
58 /* arch/sh/kernel/cpu/bus.c */
59 extern int sh_device_register(struct sh_dev
*dev
);
60 extern void sh_device_unregister(struct sh_dev
*dev
);
61 extern int sh_driver_register(struct sh_driver
*drv
);
62 extern void sh_driver_unregister(struct sh_driver
*drv
);
64 #endif /* __ASM_SH_BUS_SH_H */