ARM: OMAP: mcbsp: Convert core driver to proper platform driver
Convert the plat-omap/mcbsp.c driver to be proper platform driver. Remove the omap_mcbsp_init function call which was called from mach-omap1/2/mcbsp.c to register the platform driver for the just created platform device in the same function. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Tony Lindgren <tony@atomide.com> Tested-by: Grazvydas Ignotas <notasas@gmail.com> Tested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Signed-off-by: Liam Girdwood <lrg@ti.com>
This commit is contained in:
parent
0324e02a07
commit
0210dc4eaf
|
@ -449,7 +449,7 @@ static int __init omap1_mcbsp_init(void)
|
||||||
omap16xx_mcbsp_pdata,
|
omap16xx_mcbsp_pdata,
|
||||||
OMAP16XX_MCBSP_COUNT);
|
OMAP16XX_MCBSP_COUNT);
|
||||||
|
|
||||||
return omap_mcbsp_init();
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
arch_initcall(omap1_mcbsp_init);
|
arch_initcall(omap1_mcbsp_init);
|
||||||
|
|
|
@ -193,6 +193,6 @@ static int __init omap2_mcbsp_init(void)
|
||||||
if (!mcbsp_ptr)
|
if (!mcbsp_ptr)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
return omap_mcbsp_init();
|
return 0;
|
||||||
}
|
}
|
||||||
arch_initcall(omap2_mcbsp_init);
|
arch_initcall(omap2_mcbsp_init);
|
||||||
|
|
|
@ -360,7 +360,6 @@ struct omap_mcbsp_dev_attr {
|
||||||
extern struct omap_mcbsp **mcbsp_ptr;
|
extern struct omap_mcbsp **mcbsp_ptr;
|
||||||
extern int omap_mcbsp_count;
|
extern int omap_mcbsp_count;
|
||||||
|
|
||||||
int omap_mcbsp_init(void);
|
|
||||||
void omap_mcbsp_config(unsigned int id, const struct omap_mcbsp_reg_cfg * config);
|
void omap_mcbsp_config(unsigned int id, const struct omap_mcbsp_reg_cfg * config);
|
||||||
void omap_mcbsp_set_tx_threshold(unsigned int id, u16 threshold);
|
void omap_mcbsp_set_tx_threshold(unsigned int id, u16 threshold);
|
||||||
void omap_mcbsp_set_rx_threshold(unsigned int id, u16 threshold);
|
void omap_mcbsp_set_rx_threshold(unsigned int id, u16 threshold);
|
||||||
|
|
|
@ -1354,8 +1354,9 @@ static struct platform_driver omap_mcbsp_driver = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
int __init omap_mcbsp_init(void)
|
module_platform_driver(omap_mcbsp_driver);
|
||||||
{
|
|
||||||
/* Register the McBSP driver */
|
MODULE_AUTHOR("Samuel Ortiz <samuel.ortiz@nokia.com>");
|
||||||
return platform_driver_register(&omap_mcbsp_driver);
|
MODULE_DESCRIPTION("OMAP McBSP core driver");
|
||||||
}
|
MODULE_LICENSE("GPL");
|
||||||
|
MODULE_ALIAS("platform:omap-mcbsp");
|
||||||
|
|
Loading…
Reference in New Issue