From patchwork Thu Aug 7 07:47:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 377771 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2001:1868:205::9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4E35F14007B for ; Thu, 7 Aug 2014 17:49:36 +1000 (EST) 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 1XFIQc-0002Fl-HJ; Thu, 07 Aug 2014 07:48:02 +0000 Received: from mail-wg0-x22d.google.com ([2a00:1450:400c:c00::22d]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XFIQb-0002Dw-Lq for linux-mtd@lists.infradead.org; Thu, 07 Aug 2014 07:48:02 +0000 Received: by mail-wg0-f45.google.com with SMTP id x12so3759227wgg.16 for ; Thu, 07 Aug 2014 00:47:38 -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:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=IgOKg/anUzSjeZlFLmtpmQzvXuY+Gjv01n2UEDj5ykQ=; b=aojU3zIVUqL4QwD6s5AmucbcJGN2Vmp+Sobwl/sCYtLDq9G3hOZPWn8e4FEpzJ/nq6 fnGlHtpKaWy8xUMDGHwAq+CwsJI2jdmEJEKD0wqPRH3kuSsCzHhR7SvuYuWof/1lFTQb oijErOHXwutPIKQ1vNQ7hAFWUNJBa6bw7gGMu2ui0wmq3MqOmFpO16j+VCoZ3vq3Mhfa NOUXEpU1geY6Hyua9uaVFlpXW6o10EjjkJPb2J/95EcHbXHmUz2236NQzEmfsuUxJHR7 Okcj5Wey5peUvkzL+DZBlLfC3O8BqtXPUWRAJIg/tYRMqggwYi7/RFpDQUcdYz+We6qK pOKg== X-Received: by 10.194.89.168 with SMTP id bp8mr22526788wjb.73.1407397657791; Thu, 07 Aug 2014 00:47:37 -0700 (PDT) Received: from linux-tdhb.lan (static-91-227-21-4.devs.futuro.pl. [91.227.21.4]) by mx.google.com with ESMTPSA id b9sm26225063wic.23.2014.08.07.00.47.36 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Aug 2014 00:47:37 -0700 (PDT) From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= To: linux-mtd@lists.infradead.org, David Woodhouse , Artem Bityutskiy , Brian Norris Subject: [PATCH 2/2] mtd: spi-nor: drop jedec_probe /helper/ function Date: Thu, 7 Aug 2014 09:47:02 +0200 Message-Id: <1407397622-9252-2-git-send-email-zajec5@gmail.com> X-Mailer: git-send-email 1.8.4.5 In-Reply-To: <1407397622-9252-1-git-send-email-zajec5@gmail.com> References: <1407397622-9252-1-git-send-email-zajec5@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140807_004801_857953_56A7AE22 X-CRM114-Status: GOOD ( 11.86 ) X-Spam-Score: -0.6 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-0.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a00:1450:400c:c00:0:0:0:22d listed in] [list.dnswl.org] 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (zajec5[at]gmail.com) 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (zajec5[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid Cc: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org It's a one-liner doing no magic and its name may be confusing because it does not have to use JEDEC (e.g. when using alternative read_id). Signed-off-by: Rafał Miłecki Acked-by: Huang Shijie --- drivers/mtd/spi-nor/spi-nor.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c index 06fe959..ef45177 100644 --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c @@ -660,11 +660,6 @@ static const struct spi_device_id *spi_nor_read_id(struct spi_nor *nor) return ERR_PTR(-ENODEV); } -static const struct spi_device_id *jedec_probe(struct spi_nor *nor) -{ - return nor->read_id(nor); -} - static int spi_nor_read(struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf) { @@ -939,7 +934,7 @@ int spi_nor_scan(struct spi_nor *nor, const struct spi_device_id *id, if (info->jedec_id) { const struct spi_device_id *jid; - jid = jedec_probe(nor); + jid = nor->read_id(nor); if (IS_ERR(jid)) { return PTR_ERR(jid); } else if (jid != id) {