From patchwork Mon Jun 3 15:50:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suzuki K Poulose X-Patchwork-Id: 165636 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp4646258ili; Mon, 3 Jun 2019 08:53:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqzg5nee4bq5+Th9DVq1QSkCWB7ZV9VBDUbG3h2UDmmX9EGIN+sayORDXSF6oxd8VKHA0IZp X-Received: by 2002:a62:3006:: with SMTP id w6mr30370200pfw.159.1559577206217; Mon, 03 Jun 2019 08:53:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559577206; cv=none; d=google.com; s=arc-20160816; b=GrkmjKluVwU/qPWgNmgXrht8EAYC36NRV/8KoDK7BcuynI2E24Fc8P7LXmTkkeIW0r aIHhLDbuozwKneZT7oiJ8RgMxU7khQDLnHPbeO4DMrHvLCT9pCdigZ4aBDJMps07g9E1 nC6uG09vW+w9pxGgw4H2sqV1PBry4IHEN8wXdv4mQ1eaiIAgT2Hoh2oXaOZmzawg88Xs f4t/M49a1mSgQEZ7wEsXUU0eBe8rDlEWAYbiMn4hHROxcMewj1ipdUxop9IXEOWciTC4 k6C3aBrAvEu4SAMqqlv3r+u0BpLmLrhTL9CFsab4J+4hmJUWcy2XrgCD0sP/y2DIbOWL V5Og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=wSQd2e0rBQQ2YuN27eEE9RlI9utljkLYVzXL+YtThSE=; b=UzOB2K/a3TMvIfrsGA+6M7SgDhKZJp3bQ3Kp96X+2tugA7pV4shk4B2rc5GOTeoZgQ xyrGcQ5d28MKV3iGK6SUqmGx0GoB09ij9uErdq3ViRNUG3Ssm6/ENgvgSvRrGNvMwGh1 OZMLsLdsrXkbWqKXaJN1wBXN5GTajk7aigALywjB51HU75LVqdZHHOr3gWAQZFjY9oHF nMWxRXMBFO5wU972XpGJ3Rspci7wnFNScPjoudEviE7p56cg/NCOxK9BMYct2KIXVQKp XoEljS5fTm3kysRG8QNd144ElGgZIt+NHprxVizkTE7ufkzEEycuh4K+EPbX02u7ZLg+ XuCg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h187si21804126pfb.129.2019.06.03.08.53.25; Mon, 03 Jun 2019 08:53:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729679AbfFCPxD (ORCPT + 30 others); Mon, 3 Jun 2019 11:53:03 -0400 Received: from foss.arm.com ([217.140.101.70]:54036 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729486AbfFCPwL (ORCPT ); Mon, 3 Jun 2019 11:52:11 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 66D651A25; Mon, 3 Jun 2019 08:52:11 -0700 (PDT) Received: from en101.cambridge.arm.com (en101.cambridge.arm.com [10.1.196.93]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 2AB413F246; Mon, 3 Jun 2019 08:52:10 -0700 (PDT) From: Suzuki K Poulose To: linux-kernel@vger.kernel.org Cc: gregkh@linuxfoundation.org, rafael@kernel.org, suzuki.poulose@arm.com, Lee Jones , Arnd Bergmann Subject: [RFC PATCH 47/57] drivers: mfd: Use driver_find_device_by_name helper Date: Mon, 3 Jun 2019 16:50:13 +0100 Message-Id: <1559577023-558-48-git-send-email-suzuki.poulose@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1559577023-558-1-git-send-email-suzuki.poulose@arm.com> References: <1559577023-558-1-git-send-email-suzuki.poulose@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use the new driver_find_device_by_name() helper. Cc: Lee Jones Cc: Arnd Bergmann Signed-off-by: Suzuki K Poulose --- drivers/mfd/syscon.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) -- 2.7.4 diff --git a/drivers/mfd/syscon.c b/drivers/mfd/syscon.c index 4f39ba5..e51e39a 100644 --- a/drivers/mfd/syscon.c +++ b/drivers/mfd/syscon.c @@ -190,18 +190,12 @@ struct regmap *syscon_regmap_lookup_by_compatible(const char *s) } EXPORT_SYMBOL_GPL(syscon_regmap_lookup_by_compatible); -static int syscon_match_pdevname(struct device *dev, const void *data) -{ - return !strcmp(dev_name(dev), (const char *)data); -} - struct regmap *syscon_regmap_lookup_by_pdevname(const char *s) { struct device *dev; struct syscon *syscon; - dev = driver_find_device(&syscon_driver.driver, NULL, (void *)s, - syscon_match_pdevname); + dev = driver_find_device_by_name(&syscon_driver.driver, NULL, s); if (!dev) return ERR_PTR(-EPROBE_DEFER);