diff options
author | Brian Norris <computersforpeace@gmail.com> | 2013-10-23 22:34:46 -0400 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2013-11-07 02:33:06 -0500 |
commit | dc525ff4705cee2291b1637a650489aca86ac937 (patch) | |
tree | 54ed778fbdcff2806fd2171aa7d00b33db5020eb /drivers/mtd | |
parent | ddba7c5ad797f4b878f4e177ef300c1f9837cd29 (diff) |
mtd: m25p80: remove 'disabled' device check
It seems like the following commit was never necessary
commit 5f949137952020214cd167093dd7be448f21c079
Author: Shaohui Xie <Shaohui.Xie@freescale.com>
Date: Fri Oct 14 15:49:00 2011 +0800
mtd: m25p80: don't probe device which has status of 'disabled'
because it duplicates the code in of_platform_device_create_pdata()
which ensures that 'disabled' nodes are never instantiated.
Also, drop the __maybe_unused.
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Reviewed-by: Sourav Poddar <sourav.poddar@ti.com>
Reviewed-by: Grant Likely <grant.likely@linaro.org>
Cc: Rob Herring <rob.herring@calxeda.com>
Cc: <devicetree@vger.kernel.org>
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/devices/m25p80.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c index d6c5c57380f8..a1dc49a6f84f 100644 --- a/drivers/mtd/devices/m25p80.c +++ b/drivers/mtd/devices/m25p80.c | |||
@@ -935,12 +935,7 @@ static int m25p_probe(struct spi_device *spi) | |||
935 | struct flash_info *info; | 935 | struct flash_info *info; |
936 | unsigned i; | 936 | unsigned i; |
937 | struct mtd_part_parser_data ppdata; | 937 | struct mtd_part_parser_data ppdata; |
938 | struct device_node __maybe_unused *np = spi->dev.of_node; | 938 | struct device_node *np = spi->dev.of_node; |
939 | |||
940 | #ifdef CONFIG_MTD_OF_PARTS | ||
941 | if (!of_device_is_available(np)) | ||
942 | return -ENODEV; | ||
943 | #endif | ||
944 | 939 | ||
945 | /* Platform data helps sort out which chip type we have, as | 940 | /* Platform data helps sort out which chip type we have, as |
946 | * well as how this board partitions it. If we don't have | 941 | * well as how this board partitions it. If we don't have |