From patchwork Mon Sep 29 09:47:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 4995131 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 297589F1D4 for ; Mon, 29 Sep 2014 09:51:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 67D4020265 for ; Mon, 29 Sep 2014 09:51:49 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 866D62025B for ; Mon, 29 Sep 2014 09:51:48 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XYXaS-00086t-L3; Mon, 29 Sep 2014 09:49:44 +0000 Received: from mail-wi0-x22b.google.com ([2a00:1450:400c:c05::22b]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XYXaK-0007uu-VV; Mon, 29 Sep 2014 09:49:37 +0000 Received: by mail-wi0-f171.google.com with SMTP id ho1so2807253wib.4 for ; Mon, 29 Sep 2014 02:49:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version:content-type :content-transfer-encoding; bh=/IilddZuXn0kYRS4qeYDBgSbDd1TBHQTTyMHIU7cFKM=; b=H7TmHcWJm9OjYSTkQAjV4gK29maLRw5x/XF9vfa35dJ+q3KUxqW6noFIArr/GxzeLM viZX43LtrHZuklvPU3eXJG6r1Ag1aITcwmY4IklS4kVGD+VvZ7JdfYHA3iEc4BryVqL2 6ll7QjRQvRHFemb7WWPwM10LSxynsxs4s6imt5jWe46cJwThBi8D7e0LYqK9iUY9kcF4 UFam3ZHoyf0tWVuFASOdLnLpoRPNGt7xz8a8o8Q9ZhnibQa1C2FR3FG4vqJSngPVVXAW LjvkPYc5aMa3rJwLR/TwPc+ghdbfJqr4ltb9nV0hy3wvk+TIHb7ARVkPVz3fUNz/qnqo O8VQ== X-Received: by 10.180.106.232 with SMTP id gx8mr12057279wib.34.1411984154390; Mon, 29 Sep 2014 02:49:14 -0700 (PDT) Received: from linux-tdhb.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by mx.google.com with ESMTPSA id fs13sm10011559wic.19.2014.09.29.02.49.11 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Sep 2014 02:49:13 -0700 (PDT) From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= To: David Woodhouse , Artem Bityutskiy , Brian Norris , linux-mtd@lists.infradead.org Subject: [PATCH 1/2] mtd: m25p80: get rid of spi_get_device_id Date: Mon, 29 Sep 2014 11:47:53 +0200 Message-Id: <1411984074-3850-1-git-send-email-zajec5@gmail.com> X-Mailer: git-send-email 1.8.4.5 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140929_024937_185899_31427EC4 X-CRM114-Status: GOOD ( 12.16 ) X-Spam-Score: -0.6 (/) Cc: Andrew Lunn , Jason Cooper , Hauke Mehrtens , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , linux-spi , Geert Uytterhoeven , Huang Shijie , Ian Campbell , Ben Hutchings , linux-arm-kernel@lists.infradead.org, debian-kernel X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This simplifies the way we use spi_nor framework and will allow us to drop spi_nor_match_id. Signed-off-by: Rafa? Mi?ecki --- drivers/mtd/devices/m25p80.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c index dcda628..822209d 100644 --- a/drivers/mtd/devices/m25p80.c +++ b/drivers/mtd/devices/m25p80.c @@ -197,6 +197,7 @@ static int m25p_probe(struct spi_device *spi) struct m25p *flash; struct spi_nor *nor; enum read_mode mode = SPI_NOR_NORMAL; + char *flash_name = NULL; int ret; data = dev_get_platdata(&spi->dev); @@ -236,12 +237,11 @@ static int m25p_probe(struct spi_device *spi) * If that's the case, respect "type" and ignore a "name". */ if (data && data->type) - id = spi_nor_match_id(data->type); - - /* If we didn't get name from platform, simply use "modalias". */ - if (!id) - id = spi_get_device_id(spi); + flash_name = data->type; + else + flash_name = spi->modalias; + id = spi_nor_match_id(flash_name); ret = spi_nor_scan(nor, id, mode); if (ret) return ret;