Index: work-powerpc.git/arch/ppc/syslib/bestcomm/bestcomm.c =================================================================== --- work-powerpc.git.orig/arch/ppc/syslib/bestcomm/bestcomm.c +++ work-powerpc.git/arch/ppc/syslib/bestcomm/bestcomm.c @@ -264,9 +264,8 @@ void sdma_free(struct sdma *s) kfree(s); } -static int __devinit mpc52xx_sdma_probe(struct device *dev) +static int __devinit mpc52xx_sdma_probe(struct platform_device *pdev) { - struct platform_device *pdev = to_platform_device(dev); int task; u32 *context; u32 *fdt; @@ -361,30 +360,31 @@ out: } -static struct device_driver mpc52xx_sdma_driver = { - .owner = THIS_MODULE, - .name = DRIVER_NAME, - .bus = &platform_bus_type, +static struct platform_driver mpc52xx_sdma_driver = { .probe = mpc52xx_sdma_probe, /* .remove = mpc52xx_sdma_remove, TODO */ #ifdef CONFIG_PM /* .suspend = mpc52xx_sdma_suspend, TODO */ /* .resume = mpc52xx_sdma_resume, TODO */ #endif + .driver = { + .owner = THIS_MODULE, + .name = DRIVER_NAME, + }, }; static int __init mpc52xx_sdma_init(void) { printk(KERN_INFO "DMA: MPC52xx BestComm driver\n"); - return driver_register(&mpc52xx_sdma_driver); + return platform_driver_register(&mpc52xx_sdma_driver); } #ifdef MODULE static void __exit mpc52xx_sdma_exit(void) { - driver_unregister(&mpc52xx_sdma_driver); + platform_driver_unregister(&mpc52xx_sdma_driver); } #endif