X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=blobdiff_plain;f=drivers%2Fmtd%2Fnand%2Fexcite_nandflash.c;h=72446fb48d4b90321be0c3611d57d8a9e02877f3;hp=ced14b5294d51dac99826cee87899e464abf5fe5;hb=7a192ec334cab9fafe3a8665a65af398b0e24730;hpb=6da2d377bba06c29d0bc41c8dee014164dec82a7 diff --git a/drivers/mtd/nand/excite_nandflash.c b/drivers/mtd/nand/excite_nandflash.c index ced14b5294d5..72446fb48d4b 100644 --- a/drivers/mtd/nand/excite_nandflash.c +++ b/drivers/mtd/nand/excite_nandflash.c @@ -128,11 +128,11 @@ static int excite_nand_devready(struct mtd_info *mtd) * The binding to the mtd and all allocated * resources are released. */ -static int __exit excite_nand_remove(struct device *dev) +static int __exit excite_nand_remove(struct platform_device *dev) { - struct excite_nand_drvdata * const this = dev_get_drvdata(dev); + struct excite_nand_drvdata * const this = platform_get_drvdata(dev); - dev_set_drvdata(dev, NULL); + platform_set_drvdata(dev, NULL); if (unlikely(!this)) { printk(KERN_ERR "%s: called %s without private data!!", @@ -159,9 +159,8 @@ static int __exit excite_nand_remove(struct device *dev) * it can allocate all necessary resources then calls the * nand layer to look for devices. */ -static int __init excite_nand_probe(struct device *dev) +static int __init excite_nand_probe(struct platform_device *pdev) { - struct platform_device * const pdev = to_platform_device(dev); struct excite_nand_drvdata *drvdata; /* private driver data */ struct nand_chip *board_chip; /* private flash chip data */ struct mtd_info *board_mtd; /* mtd info for this board */ @@ -175,7 +174,7 @@ static int __init excite_nand_probe(struct device *dev) } /* bind private data into driver */ - dev_set_drvdata(dev, drvdata); + platform_set_drvdata(pdev, drvdata); /* allocate and map the resource */ drvdata->regs = @@ -219,23 +218,25 @@ static int __init excite_nand_probe(struct device *dev) return 0; } -static struct device_driver excite_nand_driver = { - .name = "excite_nand", - .bus = &platform_bus_type, +static struct platform_driver excite_nand_driver = { + .driver = { + .name = "excite_nand", + .owner = THIS_MODULE, + }, .probe = excite_nand_probe, - .remove = __exit_p(excite_nand_remove) + .remove = __devexit_p(excite_nand_remove) }; static int __init excite_nand_init(void) { pr_info("Basler eXcite nand flash driver Version " EXCITE_NANDFLASH_VERSION "\n"); - return driver_register(&excite_nand_driver); + return platform_driver_register(&excite_nand_driver); } static void __exit excite_nand_exit(void) { - driver_unregister(&excite_nand_driver); + platform_driver_unregister(&excite_nand_driver); } module_init(excite_nand_init);