/* -*- mode: c; c-basic-offset: 8 -*- */12/*3* MCA driver support functions for sysfs.4*5* (C) 2002 James Bottomley <[email protected]>6*7**-----------------------------------------------------------------------------8**9** This program is free software; you can redistribute it and/or modify10** it under the terms of the GNU General Public License as published by11** the Free Software Foundation; either version 2 of the License, or12** (at your option) any later version.13**14** This program is distributed in the hope that it will be useful,15** but WITHOUT ANY WARRANTY; without even the implied warranty of16** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the17** GNU General Public License for more details.18**19** You should have received a copy of the GNU General Public License20** along with this program; if not, write to the Free Software21** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.22**23**-----------------------------------------------------------------------------24*/2526#include <linux/device.h>27#include <linux/mca.h>28#include <linux/module.h>2930int mca_register_driver(struct mca_driver *mca_drv)31{32int r;3334if (MCA_bus) {35mca_drv->driver.bus = &mca_bus_type;36if ((r = driver_register(&mca_drv->driver)) < 0)37return r;38mca_drv->integrated_id = 0;39}4041return 0;42}43EXPORT_SYMBOL(mca_register_driver);4445int mca_register_driver_integrated(struct mca_driver *mca_driver,46int integrated_id)47{48int r = mca_register_driver(mca_driver);4950if (!r)51mca_driver->integrated_id = integrated_id;5253return r;54}55EXPORT_SYMBOL(mca_register_driver_integrated);5657void mca_unregister_driver(struct mca_driver *mca_drv)58{59if (MCA_bus)60driver_unregister(&mca_drv->driver);61}62EXPORT_SYMBOL(mca_unregister_driver);636465