summaryrefslogtreecommitdiff
path: root/drivers/mtd/nand/raw/sh_flctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/nand/raw/sh_flctl.c')
-rw-r--r--drivers/mtd/nand/raw/sh_flctl.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/mtd/nand/raw/sh_flctl.c b/drivers/mtd/nand/raw/sh_flctl.c
index a278829469d6..97f733e481ff 100644
--- a/drivers/mtd/nand/raw/sh_flctl.c
+++ b/drivers/mtd/nand/raw/sh_flctl.c
@@ -17,7 +17,6 @@
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/of.h>
-#include <linux/of_device.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/sh_dma.h>
@@ -1124,8 +1123,7 @@ static int flctl_probe(struct platform_device *pdev)
if (!flctl)
return -ENOMEM;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- flctl->reg = devm_ioremap_resource(&pdev->dev, res);
+ flctl->reg = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
if (IS_ERR(flctl->reg))
return PTR_ERR(flctl->reg);
flctl->fifo = res->start + 0x24; /* FLDTFIFO */
@@ -1203,7 +1201,7 @@ err_chip:
return ret;
}
-static int flctl_remove(struct platform_device *pdev)
+static void flctl_remove(struct platform_device *pdev)
{
struct sh_flctl *flctl = platform_get_drvdata(pdev);
struct nand_chip *chip = &flctl->chip;
@@ -1214,11 +1212,10 @@ static int flctl_remove(struct platform_device *pdev)
WARN_ON(ret);
nand_cleanup(chip);
pm_runtime_disable(&pdev->dev);
-
- return 0;
}
static struct platform_driver flctl_driver = {
+ .probe = flctl_probe,
.remove = flctl_remove,
.driver = {
.name = "sh_flctl",
@@ -1226,7 +1223,7 @@ static struct platform_driver flctl_driver = {
},
};
-module_platform_driver_probe(flctl_driver, flctl_probe);
+module_platform_driver(flctl_driver);
MODULE_LICENSE("GPL v2");
MODULE_AUTHOR("Yoshihiro Shimoda");