Message ID | 1559577023-558-7-git-send-email-suzuki.poulose@arm.com |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp4647860ili; Mon, 3 Jun 2019 08:54:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqzNS2E5lHo8C5VJuEi6tp4Huytc2HVYNTUqkYBmVLyhKrN2D90MS9Jf8A+PJ3/Nd91EzFFx X-Received: by 2002:a63:231c:: with SMTP id j28mr28878134pgj.430.1559577298595; Mon, 03 Jun 2019 08:54:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559577298; cv=none; d=google.com; s=arc-20160816; b=tUaQMf0yUOipqR1Rk7p/fxnJ/L8/ROErHSa3ueBHt+pFQZXDeTwMmui05JZf/2QtGh ZMk+Yd/PDPQsw3jKVgFIlXy4Sfe/RXcL23co5vlfiSLuBBEAl7/srOoYfb0YFBzndCaP I4VGXggR3Y5ag29xLkSlPdgV8zwpk4pPgIJGQ2Xtknid2jC0DsgZs5EMjzpbmbiVebB8 bRokSCzY4qy033xgTBTOy8ApDZAJbxioZkjoWfTPFe2ZGCxIyVtAhUVidmgvbzhMIZb6 KS0vYzI6EbXhO3F3T3RR6t1ep654rAZESS0OFxTb3P1ubl51kDDWOMaCsp/XGjg5gqkr 4+RQ== 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=kuvu81n3fwKxigh70pLkN3x8UcVaT3uKKlKzptURQ2Y=; b=0AePd+eYRjYRo8LQQuv2N2695SWKVDN4lyKjNCNhfIUsLx5bYzC09X+v5aTwQpDaKQ ctTjL7fy6shO7aBaHhGM/+Bz5j0PntwsmAqiLmK1Ig76ChEJ8q1/G+TF9Jd7JG3ihfXW stQzJef7p9zsm+W3dV9UAKpxuvAgnyWOnpkHwC58wT7D2WyXLMcw4zCPIGOu4SGkt7aH RbR7Am23cbuoJv4LHVEEom6fZhWkFhpXrjh8SDvPhCiww90RJtG1GsZBhMSzYLUePIFm a7bA8aabBap22/mUQEFruuaSSeiyynCe3fmSbrHo0MTMIg8+AMLTIRDmF/DkJe/uw6q4 9h3w== 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: <linux-kernel-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w17si7474704pjn.21.2019.06.03.08.54.58; Mon, 03 Jun 2019 08:54:58 -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 S1728548AbfFCPvM (ORCPT <rfc822;mike.holmes@linaro.org> + 30 others); Mon, 3 Jun 2019 11:51:12 -0400 Received: from foss.arm.com ([217.140.101.70]:53578 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728391AbfFCPvI (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 3 Jun 2019 11:51:08 -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 B7E1E1688; Mon, 3 Jun 2019 08:51:07 -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 7BCFD3F246; Mon, 3 Jun 2019 08:51:06 -0700 (PDT) From: Suzuki K Poulose <suzuki.poulose@arm.com> To: linux-kernel@vger.kernel.org Cc: gregkh@linuxfoundation.org, rafael@kernel.org, suzuki.poulose@arm.com, Wolfram Sang <wsa@the-dreams.de>, linux-i2c@vger.kernel.org Subject: [RFC PATCH 06/57] drivers: i2c: i2c-core: Use bus_find_device_by_of_node helper Date: Mon, 3 Jun 2019 16:49:32 +0100 Message-Id: <1559577023-558-7-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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org |
Series |
[RFC,01/57] drivers: s390/cio: Use driver_for_each_device
|
expand
|
diff --git a/drivers/i2c/i2c-core-of.c b/drivers/i2c/i2c-core-of.c index 406e5f6..b0b3fe1 100644 --- a/drivers/i2c/i2c-core-of.c +++ b/drivers/i2c/i2c-core-of.c @@ -112,11 +112,6 @@ void of_i2c_register_devices(struct i2c_adapter *adap) of_node_put(bus); } -static int of_dev_node_match(struct device *dev, void *data) -{ - return dev->of_node == data; -} - static int of_dev_or_parent_node_match(struct device *dev, void *data) { if (dev->of_node == data) @@ -134,7 +129,7 @@ struct i2c_client *of_find_i2c_device_by_node(struct device_node *node) struct device *dev; struct i2c_client *client; - dev = bus_find_device(&i2c_bus_type, NULL, node, of_dev_node_match); + dev = bus_find_device_by_of_node(&i2c_bus_type, NULL, node); if (!dev) return NULL;
Switch to using the bus_find_device_by_of_node helper. Cc: Wolfram Sang <wsa@the-dreams.de> Cc: linux-i2c@vger.kernel.org Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com> --- drivers/i2c/i2c-core-of.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) -- 2.7.4