From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oa0-x22e.google.com ([2607:f8b0:4003:c02::22e]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VZB9U-00047A-CF for linux-mtd@lists.infradead.org; Thu, 24 Oct 2013 03:00:00 +0000 Received: by mail-oa0-f46.google.com with SMTP id g12so1838541oah.33 for ; Wed, 23 Oct 2013 19:59:39 -0700 (PDT) From: Brian Norris To: Subject: [PATCH 5/5] mtd: m25p80: remove 'disabled' device check Date: Wed, 23 Oct 2013 19:58:23 -0700 Message-Id: <1382583503-13748-5-git-send-email-computersforpeace@gmail.com> In-Reply-To: <1382583503-13748-1-git-send-email-computersforpeace@gmail.com> References: <1382583503-13748-1-git-send-email-computersforpeace@gmail.com> Cc: Marek Vasut , devicetree@vger.kernel.org, Artem Bityutskiy , Rob Herring , Grant Likely , sourav.poddar@ti.com, Brian Norris List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , It seems like the following commit was never necessary commit 5f949137952020214cd167093dd7be448f21c079 Author: Shaohui Xie 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 Cc: Grant Likely Cc: Rob Herring Cc: --- drivers/mtd/devices/m25p80.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c index d6c5c57..a1dc49a 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) struct flash_info *info; unsigned i; struct mtd_part_parser_data ppdata; - struct device_node __maybe_unused *np = spi->dev.of_node; - -#ifdef CONFIG_MTD_OF_PARTS - if (!of_device_is_available(np)) - return -ENODEV; -#endif + struct device_node *np = spi->dev.of_node; /* Platform data helps sort out which chip type we have, as * well as how this board partitions it. If we don't have -- 1.8.4 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Brian Norris Subject: [PATCH 5/5] mtd: m25p80: remove 'disabled' device check Date: Wed, 23 Oct 2013 19:58:23 -0700 Message-ID: <1382583503-13748-5-git-send-email-computersforpeace@gmail.com> References: <1382583503-13748-1-git-send-email-computersforpeace@gmail.com> Return-path: In-Reply-To: <1382583503-13748-1-git-send-email-computersforpeace-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org Cc: Artem Bityutskiy , Marek Vasut , Brian Norris , sourav.poddar-l0cyMroinI0@public.gmane.org, Grant Likely , Rob Herring , devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: devicetree@vger.kernel.org It seems like the following commit was never necessary commit 5f949137952020214cd167093dd7be448f21c079 Author: Shaohui Xie 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 Cc: Grant Likely Cc: Rob Herring Cc: --- drivers/mtd/devices/m25p80.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c index d6c5c57..a1dc49a 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) struct flash_info *info; unsigned i; struct mtd_part_parser_data ppdata; - struct device_node __maybe_unused *np = spi->dev.of_node; - -#ifdef CONFIG_MTD_OF_PARTS - if (!of_device_is_available(np)) - return -ENODEV; -#endif + struct device_node *np = spi->dev.of_node; /* Platform data helps sort out which chip type we have, as * well as how this board partitions it. If we don't have -- 1.8.4 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html