Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp648884imm; Fri, 31 Aug 2018 09:31:02 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYNao1LXZ5aVSkmGECh04dZnB15zx6FT0CM3hvKHW5hYfjfp5pOexAsTwwTaka4KFlTS3Xf X-Received: by 2002:a65:40cd:: with SMTP id u13-v6mr324773pgp.334.1535733062140; Fri, 31 Aug 2018 09:31:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535733062; cv=none; d=google.com; s=arc-20160816; b=aTxmbV9sBQAP6fruzAJRm5UgEHH/G8siOPQhyuw1zkhu501hAutJvMFvaH0X56A/XX LvOz5hIAZ2V4sjVFqOfYNgPWpFz1WA5/9APORQxJfI+ElbaQKVaBAM9PBU/cVEH2oNmF 18ik0842v/kEb84IqpX85QdVu1vitinCXEI8tbwqsCBagLljDKFtlSy1L5DYqPTPaKjE c6jy64e/qgvNYHnRitu5qkDHGeRzruIsKDRs1x+9VjbB72/YlEmm0pa+0RH1R2YmqwoX QdpHzupetV57mgscElw1kflqrmER9uo/tPEIcFHoVH9/C2vh4hcpU0CANHe58BGzfhlY zgOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=AwhStgysJi8utkbsMwpI5Ye7vnBrHJGgv6tml1cC3/o=; b=LJQq6LSSD3u6ncHIqDKHTIdyx5sR/kKAgHe8ivAfEzsHeugPXmRJnwqmn00Ey6dS4o lr80LE0utnwTg+qSlFePcg0d8KFRBYFJpnZHhH8LZU4C1OP1NmJOS1cvrTjZ97dPQGYN IwHOkHixelV165ZtEL/uyRTmBKGIsVoWKtQh+qmbVf+/L8IF0wC06d4zB7dQKDjk55ry uIWd5JE2lj3tjW7vPKy1Jukobj84fQGYFKrTnarwMbPDNuoN4il5pzySQbmj/X5EntXR bVpdDRVxt+3rMOB+50tKZZAE1Eiw2zum6xDa7E9Ce+eQ0pbBp+htgxfAzlwsFjygleAH gmtQ== 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 bd6-v6si9523239plb.265.2018.08.31.09.30.45; Fri, 31 Aug 2018 09:31:02 -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 S1728531AbeHaTTp (ORCPT + 99 others); Fri, 31 Aug 2018 15:19:45 -0400 Received: from mail.bootlin.com ([62.4.15.54]:46968 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727303AbeHaTTo (ORCPT ); Fri, 31 Aug 2018 15:19:44 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id 9275B2072D; Fri, 31 Aug 2018 17:11:47 +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 (242.171.71.37.rev.sfr.net [37.71.171.242]) by mail.bootlin.com (Postfix) with ESMTPSA id 9E887208C7; Fri, 31 Aug 2018 17:11:27 +0200 (CEST) From: Alexandre Belloni To: Wolfram Sang , Jarkko Nikula , James Hogan , Paul Burton Cc: 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 v5 1/7] i2c: designware: use generic table matching Date: Fri, 31 Aug 2018 17:11:08 +0200 Message-Id: <20180831151114.25739-2-alexandre.belloni@bootlin.com> X-Mailer: git-send-email 2.19.0.rc1 In-Reply-To: <20180831151114.25739-1-alexandre.belloni@bootlin.com> References: <20180831151114.25739-1-alexandre.belloni@bootlin.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Tested-by: Jarkko Nikula Acked-by: Jarkko Nikula 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 1a8d2da5b000..72f403e75fa6 100644 --- a/drivers/i2c/busses/i2c-designware-platdrv.c +++ b/drivers/i2c/busses/i2c-designware-platdrv.c @@ -86,7 +86,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; @@ -119,10 +118,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; @@ -291,6 +286,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.19.0.rc1