Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2439495imm; Thu, 16 Aug 2018 09:37:02 -0700 (PDT) X-Google-Smtp-Source: AA+uWPx/+ybbfB6bt1dhUzMrHIEpnzMeWyrSmmtKm8y7JjhDFbnFKHdTLJYy4sQdGWn1UkLpRyWx X-Received: by 2002:a63:63c3:: with SMTP id x186-v6mr3058082pgb.173.1534437422000; Thu, 16 Aug 2018 09:37:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534437421; cv=none; d=google.com; s=arc-20160816; b=tO40qUnB3sNBPMVmMhfS4fZtIeKz/DeKlhGrbEBdsdPMHTItsXVhQzF0nPsuhB7azn ph0TVJh4x+iLkXWwuly2351UETP4sKkM3VpXWDxWQDQVcD2d032d9r0Ci7dfYt5+lEj/ eYQ5lqiygmKF3MO2wl9cIiwZb5g48H8w+duttbnu2ZF2+eJYgkv38tmziG+HXJWrfzQF fpmR0q5heZQyPUmdsDl06EzO9sRZNJYKQD6xFjvjXj74ykYTQP38gA6aR7GX+/uyIMyx 73RixR6VNWyrS3Ir784b9/DDXJKjlPHKOlBMMUT26o4Ai/CeW6nUqcBlCv1snp59DjlZ AFug== 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:arc-authentication-results; bh=GrIXTvWAKhgPdeLPcp+4Wyh40UyAlLnDLPJqCBzZny0=; b=RNFjMklzgP6EUTqMTVkHN+yuidnUpQnFRgDG33QvjjCvCbLaD1HXi2XTXAHdGg7u5v b/qaq39ZsQdFe8JwuMOClUnzmsF8jj4MWIBCjbO2Wu7Fa5UFINbhGdz+n2uMhAlHj439 HLuftonCl9QpWQ4OKf7yJeo1KkxfSI8OwRZtYFib+cYbgp8C+60qE9nbUVDkxEufQX/p vW5/QZItJKw7HdZtnuuLr9Log5MWrV0sde8HfS+bWlp8LLCSJRKMKiWX+0V1O8wgen1Y 35WeSjeqhiaUpGI3dCFMoQWdDi2GB5I62B16xTZSbt2W5ut4waflCy53nQmIWNuea7yy 60FA== 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 g9-v6si21406065plo.23.2018.08.16.09.36.44; Thu, 16 Aug 2018 09:37:01 -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 S2390160AbeHPLmi (ORCPT + 99 others); Thu, 16 Aug 2018 07:42:38 -0400 Received: from mail.bootlin.com ([62.4.15.54]:51584 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731458AbeHPLmh (ORCPT ); Thu, 16 Aug 2018 07:42:37 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id B738120E1C; Thu, 16 Aug 2018 10:45:35 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost (unknown [78.250.249.73]) by mail.bootlin.com (Postfix) with ESMTPSA id 59306206A6; Thu, 16 Aug 2018 10:45:25 +0200 (CEST) From: Alexandre Belloni To: Wolfram Sang , Jarkko Nikula , James Hogan Cc: Paul Burton , Andy Shevchenko , Mika Westerberg , linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@linux-mips.org, Thomas Petazzoni , Allan Nielsen , Alexandre Belloni Subject: [PATCH v4 1/7] i2c: designware: use generic table matching Date: Thu, 16 Aug 2018 10:45:15 +0200 Message-Id: <20180816084521.16289-2-alexandre.belloni@bootlin.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180816084521.16289-1-alexandre.belloni@bootlin.com> References: <20180816084521.16289-1-alexandre.belloni@bootlin.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Switch to device_get_match_data in probe to match the device specific data instead of using the acpi specific function. Suggested-by: Andy Shevchenko Acked-by: Andy Shevchenko Signed-off-by: Alexandre Belloni --- drivers/i2c/busses/i2c-designware-platdrv.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c index fc1462601b16..d5936c32c075 100644 --- a/drivers/i2c/busses/i2c-designware-platdrv.c +++ b/drivers/i2c/busses/i2c-designware-platdrv.c @@ -99,7 +99,6 @@ static int dw_i2c_acpi_configure(struct platform_device *pdev) struct i2c_timings *t = &dev->timings; u32 ss_ht = 0, fp_ht = 0, hs_ht = 0, fs_ht = 0; acpi_handle handle = ACPI_HANDLE(&pdev->dev); - const struct acpi_device_id *id; struct acpi_device *adev; const char *uid; @@ -132,10 +131,6 @@ static int dw_i2c_acpi_configure(struct platform_device *pdev) break; } - id = acpi_match_device(pdev->dev.driver->acpi_match_table, &pdev->dev); - if (id && id->driver_data) - dev->flags |= (u32)id->driver_data; - if (acpi_bus_get_device(handle, &adev)) return -ENODEV; @@ -304,6 +299,8 @@ static int dw_i2c_plat_probe(struct platform_device *pdev) else t->bus_freq_hz = 400000; + dev->flags |= (uintptr_t)device_get_match_data(&pdev->dev); + if (has_acpi_companion(&pdev->dev)) dw_i2c_acpi_configure(pdev); -- 2.18.0