mirror of https://gitee.com/openkylin/linux.git
of/platform: remove all of_bus_type and of_platform_bus_type references
Both of_bus_type and of_platform_bus_type are just #define aliases for the platform bus. This patch removes all references to them and switches to the of_register_platform_driver()/of_unregister_platform_driver() API for registering. Subsequent patches will convert each user of of_register_platform_driver() into plain platform_drivers without the of_platform_driver shim. At which point the of_register_platform_driver()/of_unregister_platform_driver() functions can be removed. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
eca3930163
commit
1ab1d63a85
|
@ -57,8 +57,7 @@ struct of_device *of_find_device_by_node(struct device_node *np)
|
|||
{
|
||||
struct device *dev;
|
||||
|
||||
dev = bus_find_device(&of_platform_bus_type,
|
||||
NULL, np, of_dev_node_match);
|
||||
dev = bus_find_device(&platform_bus_type, NULL, np, of_dev_node_match);
|
||||
if (dev)
|
||||
return to_of_device(dev);
|
||||
return NULL;
|
||||
|
|
|
@ -61,8 +61,7 @@ struct of_device *of_find_device_by_node(struct device_node *np)
|
|||
{
|
||||
struct device *dev;
|
||||
|
||||
dev = bus_find_device(&of_platform_bus_type,
|
||||
NULL, np, of_dev_node_match);
|
||||
dev = bus_find_device(&platform_bus_type, NULL, np, of_dev_node_match);
|
||||
if (dev)
|
||||
return to_of_device(dev);
|
||||
return NULL;
|
||||
|
|
|
@ -13,6 +13,4 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#define of_bus_type of_platform_bus_type /* for compatibility */
|
||||
|
||||
#endif
|
||||
|
|
|
@ -243,9 +243,7 @@ static struct of_platform_driver ecpp_driver = {
|
|||
|
||||
static int parport_pc_find_nonpci_ports(int autoirq, int autodma)
|
||||
{
|
||||
of_register_driver(&ecpp_driver, &of_bus_type);
|
||||
|
||||
return 0;
|
||||
return of_register_platform_driver(&ecpp_driver);
|
||||
}
|
||||
|
||||
#endif /* !(_ASM_SPARC64_PARPORT_H */
|
||||
|
|
|
@ -184,7 +184,7 @@ static struct of_platform_driver apc_driver = {
|
|||
|
||||
static int __init apc_init(void)
|
||||
{
|
||||
return of_register_driver(&apc_driver, &of_bus_type);
|
||||
return of_register_platform_driver(&apc_driver);
|
||||
}
|
||||
|
||||
/* This driver is not critical to the boot process
|
||||
|
|
|
@ -142,7 +142,7 @@ static struct of_platform_driver auxio_driver = {
|
|||
|
||||
static int __init auxio_init(void)
|
||||
{
|
||||
return of_register_driver(&auxio_driver, &of_platform_bus_type);
|
||||
return of_register_platform_driver(&auxio_driver);
|
||||
}
|
||||
|
||||
/* Must be after subsys_initcall() so that busses are probed. Must
|
||||
|
|
|
@ -265,8 +265,8 @@ static struct of_platform_driver fhc_driver = {
|
|||
|
||||
static int __init sunfire_init(void)
|
||||
{
|
||||
(void) of_register_driver(&fhc_driver, &of_platform_bus_type);
|
||||
(void) of_register_driver(&clock_board_driver, &of_platform_bus_type);
|
||||
(void) of_register_platform_driver(&fhc_driver);
|
||||
(void) of_register_platform_driver(&clock_board_driver);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -848,7 +848,7 @@ static int __init us3mc_init(void)
|
|||
ret = register_dimm_printer(us3mc_dimm_printer);
|
||||
|
||||
if (!ret) {
|
||||
ret = of_register_driver(&us3mc_driver, &of_bus_type);
|
||||
ret = of_register_platform_driver(&us3mc_driver);
|
||||
if (ret)
|
||||
unregister_dimm_printer(us3mc_dimm_printer);
|
||||
}
|
||||
|
@ -859,7 +859,7 @@ static void __exit us3mc_cleanup(void)
|
|||
{
|
||||
if (us3mc_platform()) {
|
||||
unregister_dimm_printer(us3mc_dimm_printer);
|
||||
of_unregister_driver(&us3mc_driver);
|
||||
of_unregister_platform_driver(&us3mc_driver);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ static int node_match(struct device *dev, void *data)
|
|||
|
||||
struct of_device *of_find_device_by_node(struct device_node *dp)
|
||||
{
|
||||
struct device *dev = bus_find_device(&of_platform_bus_type, NULL,
|
||||
struct device *dev = bus_find_device(&platform_bus_type, NULL,
|
||||
dp, node_match);
|
||||
|
||||
if (dev)
|
||||
|
|
|
@ -518,7 +518,7 @@ static struct of_platform_driver fire_driver = {
|
|||
|
||||
static int __init fire_init(void)
|
||||
{
|
||||
return of_register_driver(&fire_driver, &of_bus_type);
|
||||
return of_register_platform_driver(&fire_driver);
|
||||
}
|
||||
|
||||
subsys_initcall(fire_init);
|
||||
|
|
|
@ -612,7 +612,7 @@ static struct of_platform_driver psycho_driver = {
|
|||
|
||||
static int __init psycho_init(void)
|
||||
{
|
||||
return of_register_driver(&psycho_driver, &of_bus_type);
|
||||
return of_register_platform_driver(&psycho_driver);
|
||||
}
|
||||
|
||||
subsys_initcall(psycho_init);
|
||||
|
|
|
@ -606,7 +606,7 @@ static struct of_platform_driver sabre_driver = {
|
|||
|
||||
static int __init sabre_init(void)
|
||||
{
|
||||
return of_register_driver(&sabre_driver, &of_bus_type);
|
||||
return of_register_platform_driver(&sabre_driver);
|
||||
}
|
||||
|
||||
subsys_initcall(sabre_init);
|
||||
|
|
|
@ -1501,7 +1501,7 @@ static struct of_platform_driver schizo_driver = {
|
|||
|
||||
static int __init schizo_init(void)
|
||||
{
|
||||
return of_register_driver(&schizo_driver, &of_bus_type);
|
||||
return of_register_platform_driver(&schizo_driver);
|
||||
}
|
||||
|
||||
subsys_initcall(schizo_init);
|
||||
|
|
|
@ -1019,7 +1019,7 @@ static struct of_platform_driver pci_sun4v_driver = {
|
|||
|
||||
static int __init pci_sun4v_init(void)
|
||||
{
|
||||
return of_register_driver(&pci_sun4v_driver, &of_bus_type);
|
||||
return of_register_platform_driver(&pci_sun4v_driver);
|
||||
}
|
||||
|
||||
subsys_initcall(pci_sun4v_init);
|
||||
|
|
|
@ -89,7 +89,7 @@ static struct of_platform_driver pmc_driver = {
|
|||
|
||||
static int __init pmc_init(void)
|
||||
{
|
||||
return of_register_driver(&pmc_driver, &of_bus_type);
|
||||
return of_register_platform_driver(&pmc_driver);
|
||||
}
|
||||
|
||||
/* This driver is not critical to the boot process
|
||||
|
|
|
@ -70,7 +70,7 @@ static struct of_platform_driver power_driver = {
|
|||
|
||||
static int __init power_init(void)
|
||||
{
|
||||
return of_register_driver(&power_driver, &of_platform_bus_type);
|
||||
return of_register_platform_driver(&power_driver);
|
||||
}
|
||||
|
||||
device_initcall(power_init);
|
||||
|
|
|
@ -189,7 +189,7 @@ static struct of_platform_driver clock_driver = {
|
|||
/* Probe for the mostek real time clock chip. */
|
||||
static int __init clock_init(void)
|
||||
{
|
||||
return of_register_driver(&clock_driver, &of_platform_bus_type);
|
||||
return of_register_platform_driver(&clock_driver);
|
||||
}
|
||||
/* Must be after subsys_initcall() so that busses are probed. Must
|
||||
* be before device_initcall() because things like the RTC driver
|
||||
|
|
|
@ -586,9 +586,9 @@ static int __init clock_init(void)
|
|||
if (tlb_type == hypervisor)
|
||||
return platform_device_register(&rtc_sun4v_device);
|
||||
|
||||
(void) of_register_driver(&rtc_driver, &of_platform_bus_type);
|
||||
(void) of_register_driver(&mostek_driver, &of_platform_bus_type);
|
||||
(void) of_register_driver(&bq4802_driver, &of_platform_bus_type);
|
||||
(void) of_register_platform_driver(&rtc_driver);
|
||||
(void) of_register_platform_driver(&mostek_driver);
|
||||
(void) of_register_platform_driver(&bq4802_driver);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -2795,7 +2795,7 @@ static int __init fore200e_module_init(void)
|
|||
printk(FORE200E "FORE Systems 200E-series ATM driver - version " FORE200E_VERSION "\n");
|
||||
|
||||
#ifdef CONFIG_SBUS
|
||||
err = of_register_driver(&fore200e_sba_driver, &of_bus_type);
|
||||
err = of_register_platform_driver(&fore200e_sba_driver);
|
||||
if (err)
|
||||
return err;
|
||||
#endif
|
||||
|
@ -2806,7 +2806,7 @@ static int __init fore200e_module_init(void)
|
|||
|
||||
#ifdef CONFIG_SBUS
|
||||
if (err)
|
||||
of_unregister_driver(&fore200e_sba_driver);
|
||||
of_unregister_platform_driver(&fore200e_sba_driver);
|
||||
#endif
|
||||
|
||||
return err;
|
||||
|
@ -2818,7 +2818,7 @@ static void __exit fore200e_module_cleanup(void)
|
|||
pci_unregister_driver(&fore200e_pca_driver);
|
||||
#endif
|
||||
#ifdef CONFIG_SBUS
|
||||
of_unregister_driver(&fore200e_sba_driver);
|
||||
of_unregister_platform_driver(&fore200e_sba_driver);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -762,12 +762,12 @@ static struct of_platform_driver n2rng_driver = {
|
|||
|
||||
static int __init n2rng_init(void)
|
||||
{
|
||||
return of_register_driver(&n2rng_driver, &of_bus_type);
|
||||
return of_register_platform_driver(&n2rng_driver);
|
||||
}
|
||||
|
||||
static void __exit n2rng_exit(void)
|
||||
{
|
||||
of_unregister_driver(&n2rng_driver);
|
||||
of_unregister_platform_driver(&n2rng_driver);
|
||||
}
|
||||
|
||||
module_init(n2rng_init);
|
||||
|
|
|
@ -2070,20 +2070,20 @@ static struct of_platform_driver n2_mau_driver = {
|
|||
|
||||
static int __init n2_init(void)
|
||||
{
|
||||
int err = of_register_driver(&n2_crypto_driver, &of_bus_type);
|
||||
int err = of_register_platform_driver(&n2_crypto_driver);
|
||||
|
||||
if (!err) {
|
||||
err = of_register_driver(&n2_mau_driver, &of_bus_type);
|
||||
err = of_register_platform_driver(&n2_mau_driver);
|
||||
if (err)
|
||||
of_unregister_driver(&n2_crypto_driver);
|
||||
of_unregister_platform_driver(&n2_crypto_driver);
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
static void __exit n2_exit(void)
|
||||
{
|
||||
of_unregister_driver(&n2_mau_driver);
|
||||
of_unregister_driver(&n2_crypto_driver);
|
||||
of_unregister_platform_driver(&n2_mau_driver);
|
||||
of_unregister_platform_driver(&n2_crypto_driver);
|
||||
}
|
||||
|
||||
module_init(n2_init);
|
||||
|
|
|
@ -311,12 +311,12 @@ static struct of_platform_driver env_driver = {
|
|||
|
||||
static int __init env_init(void)
|
||||
{
|
||||
return of_register_driver(&env_driver, &of_bus_type);
|
||||
return of_register_platform_driver(&env_driver);
|
||||
}
|
||||
|
||||
static void __exit env_exit(void)
|
||||
{
|
||||
of_unregister_driver(&env_driver);
|
||||
of_unregister_platform_driver(&env_driver);
|
||||
}
|
||||
|
||||
module_init(env_init);
|
||||
|
|
|
@ -353,14 +353,12 @@ static struct of_platform_driver grover_beep_driver = {
|
|||
|
||||
static int __init sparcspkr_init(void)
|
||||
{
|
||||
int err = of_register_driver(&bbc_beep_driver,
|
||||
&of_platform_bus_type);
|
||||
int err = of_register_platform_driver(&bbc_beep_driver);
|
||||
|
||||
if (!err) {
|
||||
err = of_register_driver(&grover_beep_driver,
|
||||
&of_platform_bus_type);
|
||||
err = of_register_platform_driver(&grover_beep_driver);
|
||||
if (err)
|
||||
of_unregister_driver(&bbc_beep_driver);
|
||||
of_unregister_platform_driver(&bbc_beep_driver);
|
||||
}
|
||||
|
||||
return err;
|
||||
|
@ -368,8 +366,8 @@ static int __init sparcspkr_init(void)
|
|||
|
||||
static void __exit sparcspkr_exit(void)
|
||||
{
|
||||
of_unregister_driver(&bbc_beep_driver);
|
||||
of_unregister_driver(&grover_beep_driver);
|
||||
of_unregister_platform_driver(&bbc_beep_driver);
|
||||
of_unregister_platform_driver(&grover_beep_driver);
|
||||
}
|
||||
|
||||
module_init(sparcspkr_init);
|
||||
|
|
|
@ -116,8 +116,7 @@ static int __init i8042_platform_init(void)
|
|||
if (!kbd_iobase)
|
||||
return -ENODEV;
|
||||
} else {
|
||||
int err = of_register_driver(&sparc_i8042_driver,
|
||||
&of_bus_type);
|
||||
int err = of_register_platform_driver(&sparc_i8042_driver);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
|
@ -141,7 +140,7 @@ static inline void i8042_platform_exit(void)
|
|||
struct device_node *root = of_find_node_by_path("/");
|
||||
|
||||
if (strcmp(root->name, "SUNW,JavaStation-1"))
|
||||
of_unregister_driver(&sparc_i8042_driver);
|
||||
of_unregister_platform_driver(&sparc_i8042_driver);
|
||||
}
|
||||
|
||||
#else /* !CONFIG_PCI */
|
||||
|
|
|
@ -160,12 +160,12 @@ static struct of_platform_driver uflash_driver = {
|
|||
|
||||
static int __init uflash_init(void)
|
||||
{
|
||||
return of_register_driver(&uflash_driver, &of_bus_type);
|
||||
return of_register_platform_driver(&uflash_driver);
|
||||
}
|
||||
|
||||
static void __exit uflash_exit(void)
|
||||
{
|
||||
of_unregister_driver(&uflash_driver);
|
||||
of_unregister_platform_driver(&uflash_driver);
|
||||
}
|
||||
|
||||
module_init(uflash_init);
|
||||
|
|
|
@ -2339,11 +2339,11 @@ static int __devinit emac_wait_deps(struct emac_instance *dev)
|
|||
deps[EMAC_DEP_MDIO_IDX].phandle = dev->mdio_ph;
|
||||
if (dev->blist && dev->blist > emac_boot_list)
|
||||
deps[EMAC_DEP_PREV_IDX].phandle = 0xffffffffu;
|
||||
bus_register_notifier(&of_platform_bus_type, &emac_of_bus_notifier);
|
||||
bus_register_notifier(&platform_bus_type, &emac_of_bus_notifier);
|
||||
wait_event_timeout(emac_probe_wait,
|
||||
emac_check_deps(dev, deps),
|
||||
EMAC_PROBE_DEP_TIMEOUT);
|
||||
bus_unregister_notifier(&of_platform_bus_type, &emac_of_bus_notifier);
|
||||
bus_unregister_notifier(&platform_bus_type, &emac_of_bus_notifier);
|
||||
err = emac_check_deps(dev, deps) ? 0 : -ENODEV;
|
||||
for (i = 0; i < EMAC_DEP_COUNT; i++) {
|
||||
if (deps[i].node)
|
||||
|
|
|
@ -1172,12 +1172,12 @@ static struct of_platform_driver myri_sbus_driver = {
|
|||
|
||||
static int __init myri_sbus_init(void)
|
||||
{
|
||||
return of_register_driver(&myri_sbus_driver, &of_bus_type);
|
||||
return of_register_platform_driver(&myri_sbus_driver);
|
||||
}
|
||||
|
||||
static void __exit myri_sbus_exit(void)
|
||||
{
|
||||
of_unregister_driver(&myri_sbus_driver);
|
||||
of_unregister_platform_driver(&myri_sbus_driver);
|
||||
}
|
||||
|
||||
module_init(myri_sbus_init);
|
||||
|
|
|
@ -10251,14 +10251,14 @@ static int __init niu_init(void)
|
|||
niu_debug = netif_msg_init(debug, NIU_MSG_DEFAULT);
|
||||
|
||||
#ifdef CONFIG_SPARC64
|
||||
err = of_register_driver(&niu_of_driver, &of_bus_type);
|
||||
err = of_register_platform_driver(&niu_of_driver);
|
||||
#endif
|
||||
|
||||
if (!err) {
|
||||
err = pci_register_driver(&niu_pci_driver);
|
||||
#ifdef CONFIG_SPARC64
|
||||
if (err)
|
||||
of_unregister_driver(&niu_of_driver);
|
||||
of_unregister_platform_driver(&niu_of_driver);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -10269,7 +10269,7 @@ static void __exit niu_exit(void)
|
|||
{
|
||||
pci_unregister_driver(&niu_pci_driver);
|
||||
#ifdef CONFIG_SPARC64
|
||||
of_unregister_driver(&niu_of_driver);
|
||||
of_unregister_platform_driver(&niu_of_driver);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -1301,12 +1301,12 @@ static struct of_platform_driver bigmac_sbus_driver = {
|
|||
|
||||
static int __init bigmac_init(void)
|
||||
{
|
||||
return of_register_driver(&bigmac_sbus_driver, &of_bus_type);
|
||||
return of_register_platform_driver(&bigmac_sbus_driver);
|
||||
}
|
||||
|
||||
static void __exit bigmac_exit(void)
|
||||
{
|
||||
of_unregister_driver(&bigmac_sbus_driver);
|
||||
of_unregister_platform_driver(&bigmac_sbus_driver);
|
||||
}
|
||||
|
||||
module_init(bigmac_init);
|
||||
|
|
|
@ -3304,7 +3304,7 @@ static int __init happy_meal_sbus_init(void)
|
|||
{
|
||||
int err;
|
||||
|
||||
err = of_register_driver(&hme_sbus_driver, &of_bus_type);
|
||||
err = of_register_platform_driver(&hme_sbus_driver);
|
||||
if (!err)
|
||||
err = quattro_sbus_register_irqs();
|
||||
|
||||
|
@ -3313,7 +3313,7 @@ static int __init happy_meal_sbus_init(void)
|
|||
|
||||
static void happy_meal_sbus_exit(void)
|
||||
{
|
||||
of_unregister_driver(&hme_sbus_driver);
|
||||
of_unregister_platform_driver(&hme_sbus_driver);
|
||||
quattro_sbus_free_irqs();
|
||||
|
||||
while (qfe_sbus_list) {
|
||||
|
|
|
@ -1558,12 +1558,12 @@ static struct of_platform_driver sunlance_sbus_driver = {
|
|||
/* Find all the lance cards on the system and initialize them */
|
||||
static int __init sparc_lance_init(void)
|
||||
{
|
||||
return of_register_driver(&sunlance_sbus_driver, &of_bus_type);
|
||||
return of_register_platform_driver(&sunlance_sbus_driver);
|
||||
}
|
||||
|
||||
static void __exit sparc_lance_exit(void)
|
||||
{
|
||||
of_unregister_driver(&sunlance_sbus_driver);
|
||||
of_unregister_platform_driver(&sunlance_sbus_driver);
|
||||
}
|
||||
|
||||
module_init(sparc_lance_init);
|
||||
|
|
|
@ -988,12 +988,12 @@ static struct of_platform_driver qec_sbus_driver = {
|
|||
|
||||
static int __init qec_init(void)
|
||||
{
|
||||
return of_register_driver(&qec_sbus_driver, &of_bus_type);
|
||||
return of_register_platform_driver(&qec_sbus_driver);
|
||||
}
|
||||
|
||||
static void __exit qec_exit(void)
|
||||
{
|
||||
of_unregister_driver(&qec_sbus_driver);
|
||||
of_unregister_platform_driver(&qec_sbus_driver);
|
||||
|
||||
while (root_qec_dev) {
|
||||
struct sunqec *next = root_qec_dev->next_module;
|
||||
|
|
|
@ -393,12 +393,12 @@ static struct of_platform_driver bpp_sbus_driver = {
|
|||
|
||||
static int __init parport_sunbpp_init(void)
|
||||
{
|
||||
return of_register_driver(&bpp_sbus_driver, &of_bus_type);
|
||||
return of_register_platform_driver(&bpp_sbus_driver);
|
||||
}
|
||||
|
||||
static void __exit parport_sunbpp_exit(void)
|
||||
{
|
||||
of_unregister_driver(&bpp_sbus_driver);
|
||||
of_unregister_platform_driver(&bpp_sbus_driver);
|
||||
}
|
||||
|
||||
MODULE_AUTHOR("Derrick J Brashear");
|
||||
|
|
|
@ -425,12 +425,12 @@ static struct of_platform_driver bbc_i2c_driver = {
|
|||
|
||||
static int __init bbc_i2c_init(void)
|
||||
{
|
||||
return of_register_driver(&bbc_i2c_driver, &of_bus_type);
|
||||
return of_register_platform_driver(&bbc_i2c_driver);
|
||||
}
|
||||
|
||||
static void __exit bbc_i2c_exit(void)
|
||||
{
|
||||
of_unregister_driver(&bbc_i2c_driver);
|
||||
of_unregister_platform_driver(&bbc_i2c_driver);
|
||||
}
|
||||
|
||||
module_init(bbc_i2c_init);
|
||||
|
|
|
@ -277,12 +277,12 @@ static struct of_platform_driver d7s_driver = {
|
|||
|
||||
static int __init d7s_init(void)
|
||||
{
|
||||
return of_register_driver(&d7s_driver, &of_bus_type);
|
||||
return of_register_platform_driver(&d7s_driver);
|
||||
}
|
||||
|
||||
static void __exit d7s_exit(void)
|
||||
{
|
||||
of_unregister_driver(&d7s_driver);
|
||||
of_unregister_platform_driver(&d7s_driver);
|
||||
}
|
||||
|
||||
module_init(d7s_init);
|
||||
|
|
|
@ -1142,12 +1142,12 @@ static struct of_platform_driver envctrl_driver = {
|
|||
|
||||
static int __init envctrl_init(void)
|
||||
{
|
||||
return of_register_driver(&envctrl_driver, &of_bus_type);
|
||||
return of_register_platform_driver(&envctrl_driver);
|
||||
}
|
||||
|
||||
static void __exit envctrl_exit(void)
|
||||
{
|
||||
of_unregister_driver(&envctrl_driver);
|
||||
of_unregister_platform_driver(&envctrl_driver);
|
||||
}
|
||||
|
||||
module_init(envctrl_init);
|
||||
|
|
|
@ -218,12 +218,12 @@ static struct of_platform_driver flash_driver = {
|
|||
|
||||
static int __init flash_init(void)
|
||||
{
|
||||
return of_register_driver(&flash_driver, &of_bus_type);
|
||||
return of_register_platform_driver(&flash_driver);
|
||||
}
|
||||
|
||||
static void __exit flash_cleanup(void)
|
||||
{
|
||||
of_unregister_driver(&flash_driver);
|
||||
of_unregister_platform_driver(&flash_driver);
|
||||
}
|
||||
|
||||
module_init(flash_init);
|
||||
|
|
|
@ -437,12 +437,12 @@ static struct of_platform_driver uctrl_driver = {
|
|||
|
||||
static int __init uctrl_init(void)
|
||||
{
|
||||
return of_register_driver(&uctrl_driver, &of_bus_type);
|
||||
return of_register_platform_driver(&uctrl_driver);
|
||||
}
|
||||
|
||||
static void __exit uctrl_exit(void)
|
||||
{
|
||||
of_unregister_driver(&uctrl_driver);
|
||||
of_unregister_platform_driver(&uctrl_driver);
|
||||
}
|
||||
|
||||
module_init(uctrl_init);
|
||||
|
|
|
@ -1467,12 +1467,12 @@ static struct of_platform_driver qpti_sbus_driver = {
|
|||
|
||||
static int __init qpti_init(void)
|
||||
{
|
||||
return of_register_driver(&qpti_sbus_driver, &of_bus_type);
|
||||
return of_register_platform_driver(&qpti_sbus_driver);
|
||||
}
|
||||
|
||||
static void __exit qpti_exit(void)
|
||||
{
|
||||
of_unregister_driver(&qpti_sbus_driver);
|
||||
of_unregister_platform_driver(&qpti_sbus_driver);
|
||||
}
|
||||
|
||||
MODULE_DESCRIPTION("QlogicISP SBUS driver");
|
||||
|
|
|
@ -644,12 +644,12 @@ static struct of_platform_driver esp_sbus_driver = {
|
|||
|
||||
static int __init sunesp_init(void)
|
||||
{
|
||||
return of_register_driver(&esp_sbus_driver, &of_bus_type);
|
||||
return of_register_platform_driver(&esp_sbus_driver);
|
||||
}
|
||||
|
||||
static void __exit sunesp_exit(void)
|
||||
{
|
||||
of_unregister_driver(&esp_sbus_driver);
|
||||
of_unregister_platform_driver(&esp_sbus_driver);
|
||||
}
|
||||
|
||||
MODULE_DESCRIPTION("Sun ESP SCSI driver");
|
||||
|
|
|
@ -644,12 +644,12 @@ static int __init sunhv_init(void)
|
|||
if (tlb_type != hypervisor)
|
||||
return -ENODEV;
|
||||
|
||||
return of_register_driver(&hv_driver, &of_bus_type);
|
||||
return of_register_platform_driver(&hv_driver);
|
||||
}
|
||||
|
||||
static void __exit sunhv_exit(void)
|
||||
{
|
||||
of_unregister_driver(&hv_driver);
|
||||
of_unregister_platform_driver(&hv_driver);
|
||||
}
|
||||
|
||||
module_init(sunhv_init);
|
||||
|
|
|
@ -1130,12 +1130,12 @@ static int __init sunsab_init(void)
|
|||
}
|
||||
}
|
||||
|
||||
return of_register_driver(&sab_driver, &of_bus_type);
|
||||
return of_register_platform_driver(&sab_driver);
|
||||
}
|
||||
|
||||
static void __exit sunsab_exit(void)
|
||||
{
|
||||
of_unregister_driver(&sab_driver);
|
||||
of_unregister_platform_driver(&sab_driver);
|
||||
if (sunsab_reg.nr) {
|
||||
sunserial_unregister_minors(&sunsab_reg, sunsab_reg.nr);
|
||||
}
|
||||
|
|
|
@ -1586,7 +1586,7 @@ static int __init sunsu_init(void)
|
|||
return err;
|
||||
}
|
||||
|
||||
err = of_register_driver(&su_driver, &of_bus_type);
|
||||
err = of_register_platform_driver(&su_driver);
|
||||
if (err && num_uart)
|
||||
sunserial_unregister_minors(&sunsu_reg, num_uart);
|
||||
|
||||
|
|
|
@ -1576,7 +1576,7 @@ static int __init sunzilog_init(void)
|
|||
goto out_free_tables;
|
||||
}
|
||||
|
||||
err = of_register_driver(&zs_driver, &of_bus_type);
|
||||
err = of_register_platform_driver(&zs_driver);
|
||||
if (err)
|
||||
goto out_unregister_uart;
|
||||
|
||||
|
@ -1604,7 +1604,7 @@ static int __init sunzilog_init(void)
|
|||
return err;
|
||||
|
||||
out_unregister_driver:
|
||||
of_unregister_driver(&zs_driver);
|
||||
of_unregister_platform_driver(&zs_driver);
|
||||
|
||||
out_unregister_uart:
|
||||
if (num_sunzilog) {
|
||||
|
@ -1619,7 +1619,7 @@ static int __init sunzilog_init(void)
|
|||
|
||||
static void __exit sunzilog_exit(void)
|
||||
{
|
||||
of_unregister_driver(&zs_driver);
|
||||
of_unregister_platform_driver(&zs_driver);
|
||||
|
||||
if (zilog_irq != -1) {
|
||||
struct uart_sunzilog_port *up = sunzilog_irq_chain;
|
||||
|
|
|
@ -390,12 +390,12 @@ static int __init bw2_init(void)
|
|||
if (fb_get_options("bw2fb", NULL))
|
||||
return -ENODEV;
|
||||
|
||||
return of_register_driver(&bw2_driver, &of_bus_type);
|
||||
return of_register_platform_driver(&bw2_driver);
|
||||
}
|
||||
|
||||
static void __exit bw2_exit(void)
|
||||
{
|
||||
of_unregister_driver(&bw2_driver);
|
||||
of_unregister_platform_driver(&bw2_driver);
|
||||
}
|
||||
|
||||
module_init(bw2_init);
|
||||
|
|
|
@ -610,12 +610,12 @@ static int __init cg14_init(void)
|
|||
if (fb_get_options("cg14fb", NULL))
|
||||
return -ENODEV;
|
||||
|
||||
return of_register_driver(&cg14_driver, &of_bus_type);
|
||||
return of_register_platform_driver(&cg14_driver);
|
||||
}
|
||||
|
||||
static void __exit cg14_exit(void)
|
||||
{
|
||||
of_unregister_driver(&cg14_driver);
|
||||
of_unregister_platform_driver(&cg14_driver);
|
||||
}
|
||||
|
||||
module_init(cg14_init);
|
||||
|
|
|
@ -477,12 +477,12 @@ static int __init cg3_init(void)
|
|||
if (fb_get_options("cg3fb", NULL))
|
||||
return -ENODEV;
|
||||
|
||||
return of_register_driver(&cg3_driver, &of_bus_type);
|
||||
return of_register_platform_driver(&cg3_driver);
|
||||
}
|
||||
|
||||
static void __exit cg3_exit(void)
|
||||
{
|
||||
of_unregister_driver(&cg3_driver);
|
||||
of_unregister_platform_driver(&cg3_driver);
|
||||
}
|
||||
|
||||
module_init(cg3_init);
|
||||
|
|
|
@ -870,12 +870,12 @@ static int __init cg6_init(void)
|
|||
if (fb_get_options("cg6fb", NULL))
|
||||
return -ENODEV;
|
||||
|
||||
return of_register_driver(&cg6_driver, &of_bus_type);
|
||||
return of_register_platform_driver(&cg6_driver);
|
||||
}
|
||||
|
||||
static void __exit cg6_exit(void)
|
||||
{
|
||||
of_unregister_driver(&cg6_driver);
|
||||
of_unregister_platform_driver(&cg6_driver);
|
||||
}
|
||||
|
||||
module_init(cg6_init);
|
||||
|
|
|
@ -1067,12 +1067,12 @@ static int __init ffb_init(void)
|
|||
if (fb_get_options("ffb", NULL))
|
||||
return -ENODEV;
|
||||
|
||||
return of_register_driver(&ffb_driver, &of_bus_type);
|
||||
return of_register_platform_driver(&ffb_driver);
|
||||
}
|
||||
|
||||
static void __exit ffb_exit(void)
|
||||
{
|
||||
of_unregister_driver(&ffb_driver);
|
||||
of_unregister_platform_driver(&ffb_driver);
|
||||
}
|
||||
|
||||
module_init(ffb_init);
|
||||
|
|
|
@ -677,12 +677,12 @@ static int __init leo_init(void)
|
|||
if (fb_get_options("leofb", NULL))
|
||||
return -ENODEV;
|
||||
|
||||
return of_register_driver(&leo_driver, &of_bus_type);
|
||||
return of_register_platform_driver(&leo_driver);
|
||||
}
|
||||
|
||||
static void __exit leo_exit(void)
|
||||
{
|
||||
of_unregister_driver(&leo_driver);
|
||||
of_unregister_platform_driver(&leo_driver);
|
||||
}
|
||||
|
||||
module_init(leo_init);
|
||||
|
|
|
@ -367,12 +367,12 @@ static int __init p9100_init(void)
|
|||
if (fb_get_options("p9100fb", NULL))
|
||||
return -ENODEV;
|
||||
|
||||
return of_register_driver(&p9100_driver, &of_bus_type);
|
||||
return of_register_platform_driver(&p9100_driver);
|
||||
}
|
||||
|
||||
static void __exit p9100_exit(void)
|
||||
{
|
||||
of_unregister_driver(&p9100_driver);
|
||||
of_unregister_platform_driver(&p9100_driver);
|
||||
}
|
||||
|
||||
module_init(p9100_init);
|
||||
|
|
|
@ -213,12 +213,12 @@ static int __init gfb_init(void)
|
|||
if (fb_get_options("gfb", NULL))
|
||||
return -ENODEV;
|
||||
|
||||
return of_register_driver(&gfb_driver, &of_bus_type);
|
||||
return of_register_platform_driver(&gfb_driver);
|
||||
}
|
||||
|
||||
static void __exit gfb_exit(void)
|
||||
{
|
||||
of_unregister_driver(&gfb_driver);
|
||||
of_unregister_platform_driver(&gfb_driver);
|
||||
}
|
||||
|
||||
module_init(gfb_init);
|
||||
|
|
|
@ -526,12 +526,12 @@ static int __init tcx_init(void)
|
|||
if (fb_get_options("tcxfb", NULL))
|
||||
return -ENODEV;
|
||||
|
||||
return of_register_driver(&tcx_driver, &of_bus_type);
|
||||
return of_register_platform_driver(&tcx_driver);
|
||||
}
|
||||
|
||||
static void __exit tcx_exit(void)
|
||||
{
|
||||
of_unregister_driver(&tcx_driver);
|
||||
of_unregister_platform_driver(&tcx_driver);
|
||||
}
|
||||
|
||||
module_init(tcx_init);
|
||||
|
|
|
@ -688,12 +688,12 @@ static struct of_platform_driver cpwd_driver = {
|
|||
|
||||
static int __init cpwd_init(void)
|
||||
{
|
||||
return of_register_driver(&cpwd_driver, &of_bus_type);
|
||||
return of_register_platform_driver(&cpwd_driver);
|
||||
}
|
||||
|
||||
static void __exit cpwd_exit(void)
|
||||
{
|
||||
of_unregister_driver(&cpwd_driver);
|
||||
of_unregister_platform_driver(&cpwd_driver);
|
||||
}
|
||||
|
||||
module_init(cpwd_init);
|
||||
|
|
|
@ -250,12 +250,12 @@ static struct of_platform_driver riowd_driver = {
|
|||
|
||||
static int __init riowd_init(void)
|
||||
{
|
||||
return of_register_driver(&riowd_driver, &of_bus_type);
|
||||
return of_register_platform_driver(&riowd_driver);
|
||||
}
|
||||
|
||||
static void __exit riowd_exit(void)
|
||||
{
|
||||
of_unregister_driver(&riowd_driver);
|
||||
of_unregister_platform_driver(&riowd_driver);
|
||||
}
|
||||
|
||||
module_init(riowd_init);
|
||||
|
|
|
@ -19,12 +19,6 @@
|
|||
#include <linux/of_device.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
/*
|
||||
* of_platform_bus_type isn't it's own bus anymore. It's now just an alias
|
||||
* for the platform bus.
|
||||
*/
|
||||
#define of_platform_bus_type platform_bus_type
|
||||
|
||||
extern const struct of_device_id of_default_bus_ids[];
|
||||
|
||||
/*
|
||||
|
|
|
@ -1075,7 +1075,7 @@ static struct of_platform_driver amd7930_sbus_driver = {
|
|||
|
||||
static int __init amd7930_init(void)
|
||||
{
|
||||
return of_register_driver(&amd7930_sbus_driver, &of_bus_type);
|
||||
return of_register_platform_driver(&amd7930_sbus_driver);
|
||||
}
|
||||
|
||||
static void __exit amd7930_exit(void)
|
||||
|
@ -1092,7 +1092,7 @@ static void __exit amd7930_exit(void)
|
|||
|
||||
amd7930_list = NULL;
|
||||
|
||||
of_unregister_driver(&amd7930_sbus_driver);
|
||||
of_unregister_platform_driver(&amd7930_sbus_driver);
|
||||
}
|
||||
|
||||
module_init(amd7930_init);
|
||||
|
|
|
@ -2120,12 +2120,12 @@ static struct of_platform_driver cs4231_driver = {
|
|||
|
||||
static int __init cs4231_init(void)
|
||||
{
|
||||
return of_register_driver(&cs4231_driver, &of_bus_type);
|
||||
return of_register_platform_driver(&cs4231_driver);
|
||||
}
|
||||
|
||||
static void __exit cs4231_exit(void)
|
||||
{
|
||||
of_unregister_driver(&cs4231_driver);
|
||||
of_unregister_platform_driver(&cs4231_driver);
|
||||
}
|
||||
|
||||
module_init(cs4231_init);
|
||||
|
|
|
@ -2699,12 +2699,12 @@ static struct of_platform_driver dbri_sbus_driver = {
|
|||
/* Probe for the dbri chip and then attach the driver. */
|
||||
static int __init dbri_init(void)
|
||||
{
|
||||
return of_register_driver(&dbri_sbus_driver, &of_bus_type);
|
||||
return of_register_platform_driver(&dbri_sbus_driver);
|
||||
}
|
||||
|
||||
static void __exit dbri_exit(void)
|
||||
{
|
||||
of_unregister_driver(&dbri_sbus_driver);
|
||||
of_unregister_platform_driver(&dbri_sbus_driver);
|
||||
}
|
||||
|
||||
module_init(dbri_init);
|
||||
|
|
Loading…
Reference in New Issue