diff options
author | Boris Brezillon <bbrezillon@kernel.org> | 2020-03-13 22:42:36 +0300 |
---|---|---|
committer | Tudor Ambarus <tudor.ambarus@microchip.com> | 2020-03-16 19:28:53 +0300 |
commit | a0900d0195d2dcce464f4109445a788d5860b970 (patch) | |
tree | 39a9b2262a701d04cf386942ff3e4fa9693ca331 /drivers/mtd/spi-nor/intel-spi-platform.c | |
parent | 81924dae51941018afdaf25638da804be4807ce5 (diff) | |
download | linux-a0900d0195d2dcce464f4109445a788d5860b970.tar.xz |
mtd: spi-nor: Prepare core / manufacturer code split
Move all SPI NOR controller drivers to a controllers/ sub-directory
so that we only have SPI NOR related source files under
drivers/mtd/spi-nor/.
Rename spi-nor.c into core.c, we are about to split this file in multiple
source files (one per manufacturer, plus one for the SFDP parsing logic).
Signed-off-by: Boris Brezillon <bbrezillon@kernel.org>
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Reviewed-by: Vignesh Raghavendra <vigneshr@ti.com>
Diffstat (limited to 'drivers/mtd/spi-nor/intel-spi-platform.c')
-rw-r--r-- | drivers/mtd/spi-nor/intel-spi-platform.c | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/drivers/mtd/spi-nor/intel-spi-platform.c b/drivers/mtd/spi-nor/intel-spi-platform.c deleted file mode 100644 index f80f1086f928..000000000000 --- a/drivers/mtd/spi-nor/intel-spi-platform.c +++ /dev/null @@ -1,54 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-only -/* - * Intel PCH/PCU SPI flash platform driver. - * - * Copyright (C) 2016, Intel Corporation - * Author: Mika Westerberg <mika.westerberg@linux.intel.com> - */ - -#include <linux/ioport.h> -#include <linux/module.h> -#include <linux/platform_device.h> - -#include "intel-spi.h" - -static int intel_spi_platform_probe(struct platform_device *pdev) -{ - struct intel_spi_boardinfo *info; - struct intel_spi *ispi; - struct resource *mem; - - info = dev_get_platdata(&pdev->dev); - if (!info) - return -EINVAL; - - mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); - ispi = intel_spi_probe(&pdev->dev, mem, info); - if (IS_ERR(ispi)) - return PTR_ERR(ispi); - - platform_set_drvdata(pdev, ispi); - return 0; -} - -static int intel_spi_platform_remove(struct platform_device *pdev) -{ - struct intel_spi *ispi = platform_get_drvdata(pdev); - - return intel_spi_remove(ispi); -} - -static struct platform_driver intel_spi_platform_driver = { - .probe = intel_spi_platform_probe, - .remove = intel_spi_platform_remove, - .driver = { - .name = "intel-spi", - }, -}; - -module_platform_driver(intel_spi_platform_driver); - -MODULE_DESCRIPTION("Intel PCH/PCU SPI flash platform driver"); -MODULE_AUTHOR("Mika Westerberg <mika.westerberg@linux.intel.com>"); -MODULE_LICENSE("GPL v2"); -MODULE_ALIAS("platform:intel-spi"); |