Commit ccac8ee2 authored by Russell King's avatar Russell King

[ARM] Update SA1111

Combine the two initialisation functions, allow SA1111 to be built
as a module, and remove a redundant SA1111 function prototype.
parent 22a2eeda
......@@ -957,17 +957,6 @@ static struct device_driver sa1111_device_driver = {
.resume = sa1111_resume,
};
/*
* Register the SA1111 driver with LDM.
*/
static int sa1111_driver_init(void)
{
driver_register(&sa1111_device_driver);
return 0;
}
arch_initcall(sa1111_driver_init);
/*
* Get the parent device driver (us) structure
* from a child function device
......@@ -1180,13 +1169,6 @@ struct bus_type sa1111_bus_type = {
.resume = sa1111_bus_resume,
};
static int sa1111_rab_bus_init(void)
{
return bus_register(&sa1111_bus_type);
}
postcore_initcall(sa1111_rab_bus_init);
int sa1111_driver_register(struct sa1111_driver *driver)
{
driver->drv.probe = sa1111_bus_probe;
......@@ -1200,6 +1182,26 @@ void sa1111_driver_unregister(struct sa1111_driver *driver)
driver_unregister(&driver->drv);
}
static int __init sa1111_init(void)
{
int ret = bus_register(&sa1111_bus_type);
if (ret == 0)
driver_register(&sa1111_device_driver);
return ret;
}
static void __exit sa1111_exit(void)
{
driver_unregister(&sa1111_device_driver);
bus_unregister(&sa1111_bus_type);
}
module_init(sa1111_init);
module_exit(sa1111_exit);
MODULE_DESCRIPTION("Intel Corporation SA1111 core driver");
MODULE_LICENSE("GPL");
EXPORT_SYMBOL(sa1111_check_dma_bug);
EXPORT_SYMBOL(sa1111_select_audio_mode);
EXPORT_SYMBOL(sa1111_set_audio_rate);
......
......@@ -543,7 +543,7 @@ struct sa1111_dev {
#define SA1111_DEV(_d) container_of((_d), struct sa1111_dev, dev)
#define sa1111_get_drvdata(d) dev_get_drvdata(&(d)->dev)
#define sa1111_set_drvdata(d,p) dev_get_drvdata(&(d)->dev, p)
#define sa1111_set_drvdata(d,p) dev_set_drvdata(&(d)->dev, p)
struct sa1111_driver {
struct device_driver drv;
......@@ -558,11 +558,6 @@ struct sa1111_driver {
#define SA1111_DRIVER_NAME(_sadev) ((_sadev)->dev.driver->name)
/*
* Probe for a SA1111 chip.
*/
extern int sa1111_init(unsigned long phys, unsigned int irq);
/*
* These frob the SKPCR register.
*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment