From: <aot...@us...> - 2004-02-27 12:34:43
|
Update of /cvsroot/gc-linux/linux/drivers/exi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3286/drivers/exi Added Files: Makefile exi-driver.c Log Message: EXI support, part 1 - Driver model stuff, take 1. --- NEW FILE: Makefile --- # # Makefile for the EXI bus core. # obj-$(CONFIG_EXI) += exi-driver.o --- NEW FILE: exi-driver.c --- /* * drivers/exi/exi-driver.c * * Copyright (C) 2004 Arthur Othieno <a.o...@bl...> */ #define DEBUG #include <linux/init.h> #include <linux/kernel.h> #include <linux/device.h> #include <linux/exi.h> /** * exi_driver_register - register an EXI device driver. * @drv: driver structure to register. * * Registers an EXI device driver with the bus * and consequently with the driver model core. */ int exi_driver_register(struct exi_driver *drv) { drv->driver.name = drv->name; drv->driver.bus = &exi_bus_type; return driver_register(&drv->driver); } /** * exi_driver_unregister - unregister an EXI device driver. * @drv: driver structure to unregister. * * Unregisters an EXI device driver with the bus * and consequently with the driver model core. */ void exi_driver_unregister(struct exi_driver *drv) { driver_unregister(&drv->driver); } struct bus_type exi_bus_type = { .name = "exi", }; static int __init exi_driver_init(void) { return bus_register(&exi_bus_type); } postcore_initcall(exi_driver_init); EXPORT_SYMBOL(exi_bus_type); EXPORT_SYMBOL(exi_driver_register); EXPORT_SYMBOL(exi_driver_unregister); |