From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 44F0FC433DF for ; Mon, 10 Aug 2020 18:48:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1720C22CF6 for ; Mon, 10 Aug 2020 18:48:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="MH2gaLrd" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728224AbgHJSsA (ORCPT ); Mon, 10 Aug 2020 14:48:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38528 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728071AbgHJSr7 (ORCPT ); Mon, 10 Aug 2020 14:47:59 -0400 Received: from mail-qt1-x842.google.com (mail-qt1-x842.google.com [IPv6:2607:f8b0:4864:20::842]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 10720C061756 for ; Mon, 10 Aug 2020 11:47:59 -0700 (PDT) Received: by mail-qt1-x842.google.com with SMTP id e5so7582204qth.5 for ; Mon, 10 Aug 2020 11:47:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=5nwMnMw3DbCMTn2Fuh9eAKa97/L+CWpRN1IQSKfIrY8=; b=MH2gaLrd+ufZ8bGh/fpu4X/Fn6WrIMiNmClU1rLt2mwix16/dTxs5cvPwyjuWaZAv9 ny8pcHOpdZmbrUMgAk2WpNSV3ClKUu280iuq0GCyH0opTG2DXOf5/MMeNM4y2zEX8MyO 33K5A5v6VJjE3i5tb62cCOeHWnBvFtJh+eTJzeAABy9TPV5RhQSXdinWMpcE1+PgeInS yTpaN7g9UexxUps7yD0kDaG4wZLrVrIr/NBqPGwnV3IGaalDqL2OeKd5GHFZ9pmszeG8 6VNyA6FQPcpGQT+eRxsYuelA2j+R6xZLBPFMcrCP6sHix4PoSt24AOWRq4KODFO2wJPL jcHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=5nwMnMw3DbCMTn2Fuh9eAKa97/L+CWpRN1IQSKfIrY8=; b=CjeE7HxDQfWdepAzNGqUWfY/x/vZjgvP6nj7nA3paBooiq1jRrd2b59VPiJDo2aRQI RabWfJKLIRF5Vufw+OUEe5PGn+imtRAwctkTwvYQH4HCtKawq8pCXpLhw2Ql6NBthoks xOFJ+mO8L/LbYCm0dW0wVFeJ4U6BM/8yXa+ft+mVgomPNUGTXCnuMiKqaL+yCCHF3oSw nQILSlCLrLPohYvOZdUliPcT5ymlnagHXiPrEDh7xMopFYxNwyKtVmDp6B80ohQfICfo X/nBHNNUjR82kdS6GTwSbnhpQPjlgrS80rN60Y8A14FLdN+JbENhtIaEVsDWUIUj8WRR znYQ== X-Gm-Message-State: AOAM533DAQUjTXk4cMFh4J5mSTPoOO/cfdcPGmo3LOMe3Dwx3OH2/WoE n2duQ8JzVKe8NbwQ9EwISBH3xfMjjn5K/8oJKCgJnQ== X-Google-Smtp-Source: ABdhPJzUFIIB7zZacQjcyBgpXBijPyFsFhCW5bngLlBmE5TsUrCisTyt73lEUBKPvEnILxlmIjOz+SnNtKoGYxLdbac= X-Received: by 2002:aed:21da:: with SMTP id m26mr29107739qtc.197.1597085277928; Mon, 10 Aug 2020 11:47:57 -0700 (PDT) MIME-Version: 1.0 References: <20200809172444.16019-1-steve@sk2.org> In-Reply-To: <20200809172444.16019-1-steve@sk2.org> From: Bartosz Golaszewski Date: Mon, 10 Aug 2020 20:47:47 +0200 Message-ID: Subject: Re: [PATCH v2] ARM: davinci: use simple i2c probe function To: Stephen Kitt Cc: Sekhar Nori , Russell King , arm-soc , linux-i2c , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Aug 9, 2020 at 7:24 PM Stephen Kitt wrote: > > The i2c probe functions here don't use the id information provided in > their second argument, so the single-parameter i2c probe function > ("probe_new") can be used instead. > > This avoids scanning the identifier tables during probes. > > Signed-off-by: Stephen Kitt > --- > Changes since v1: > - split into per-sub-architecture patches. > > arch/arm/mach-davinci/board-dm644x-evm.c | 5 ++--- > arch/arm/mach-davinci/board-dm646x-evm.c | 10 ++++------ > 2 files changed, 6 insertions(+), 9 deletions(-) > > diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c > index a5d3708fedf6..d0dcf69cc76d 100644 > --- a/arch/arm/mach-davinci/board-dm644x-evm.c > +++ b/arch/arm/mach-davinci/board-dm644x-evm.c > @@ -548,8 +548,7 @@ static const struct property_entry eeprom_properties[] = { > */ > static struct i2c_client *dm6446evm_msp; > > -static int dm6446evm_msp_probe(struct i2c_client *client, > - const struct i2c_device_id *id) > +static int dm6446evm_msp_probe(struct i2c_client *client) > { > dm6446evm_msp = client; > return 0; > @@ -569,7 +568,7 @@ static const struct i2c_device_id dm6446evm_msp_ids[] = { > static struct i2c_driver dm6446evm_msp_driver = { > .driver.name = "dm6446evm_msp", > .id_table = dm6446evm_msp_ids, > - .probe = dm6446evm_msp_probe, > + .probe_new = dm6446evm_msp_probe, > .remove = dm6446evm_msp_remove, > }; > > diff --git a/arch/arm/mach-davinci/board-dm646x-evm.c b/arch/arm/mach-davinci/board-dm646x-evm.c > index 4600b617f9b4..2dce16fff77e 100644 > --- a/arch/arm/mach-davinci/board-dm646x-evm.c > +++ b/arch/arm/mach-davinci/board-dm646x-evm.c > @@ -160,8 +160,7 @@ static struct platform_device davinci_aemif_device = { > #define DM646X_EVM_ATA_PWD BIT(1) > > /* CPLD Register 0 Client: used for I/O Control */ > -static int cpld_reg0_probe(struct i2c_client *client, > - const struct i2c_device_id *id) > +static int cpld_reg0_probe(struct i2c_client *client) > { > if (HAS_ATA) { > u8 data; > @@ -197,7 +196,7 @@ static const struct i2c_device_id cpld_reg_ids[] = { > static struct i2c_driver dm6467evm_cpld_driver = { > .driver.name = "cpld_reg0", > .id_table = cpld_reg_ids, > - .probe = cpld_reg0_probe, > + .probe_new = cpld_reg0_probe, > }; > > /* LEDS */ > @@ -402,8 +401,7 @@ static struct snd_platform_data dm646x_evm_snd_data[] = { > #ifdef CONFIG_I2C > static struct i2c_client *cpld_client; > > -static int cpld_video_probe(struct i2c_client *client, > - const struct i2c_device_id *id) > +static int cpld_video_probe(struct i2c_client *client) > { > cpld_client = client; > return 0; > @@ -424,7 +422,7 @@ static struct i2c_driver cpld_video_driver = { > .driver = { > .name = "cpld_video", > }, > - .probe = cpld_video_probe, > + .probe_new = cpld_video_probe, > .remove = cpld_video_remove, > .id_table = cpld_video_id, > }; > > base-commit: bcf876870b95592b52519ed4aafcf9d95999bc9c > -- > 2.20.1 > Reviewed-by: Bartosz Golaszewski From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 057B3C433DF for ; Mon, 10 Aug 2020 18:50:02 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B883622CF6 for ; Mon, 10 Aug 2020 18:50:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="yT/I8nuB"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="MH2gaLrd" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B883622CF6 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=NBDO2vgAoEa+ETNdMgZage1GggjOdwztgvvnxUoFbU8=; b=yT/I8nuB/ld0fnNUwOKfQmNRW OG5rDToflPX+yzrE1iHh0XqQ7T1IrM+GaNdSTNyFGO5ShHwVMjClt4A5q+LqOPfNU67b3XBjZ+YL0 MLON5ogctyizr5t3hYAjV2w7szsBcKenGXPa+VKPxtPJ3n7CST73STbktt7WZlemn+LxvTDWV3zVb 4MAkZ0QTYEhPUS58hrCnUvHqv3cktqRvV/V0I+DJfmk5WvLwRGjloqaR7Qo/K5mTfK11iSR6NBi0t StUYShFBl7uLxVIRQ0mYKgtFzs2CTtmuowhHwpzlsVPnWmwxEbwtHCDDsqi492XTLf9zWPjfQAiyt 3TxntA8xw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k5Cq3-0005kS-Qw; Mon, 10 Aug 2020 18:48:03 +0000 Received: from mail-qt1-x844.google.com ([2607:f8b0:4864:20::844]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k5Cq0-0005bI-JO for linux-arm-kernel@lists.infradead.org; Mon, 10 Aug 2020 18:48:01 +0000 Received: by mail-qt1-x844.google.com with SMTP id s23so7554339qtq.12 for ; Mon, 10 Aug 2020 11:47:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=5nwMnMw3DbCMTn2Fuh9eAKa97/L+CWpRN1IQSKfIrY8=; b=MH2gaLrd+ufZ8bGh/fpu4X/Fn6WrIMiNmClU1rLt2mwix16/dTxs5cvPwyjuWaZAv9 ny8pcHOpdZmbrUMgAk2WpNSV3ClKUu280iuq0GCyH0opTG2DXOf5/MMeNM4y2zEX8MyO 33K5A5v6VJjE3i5tb62cCOeHWnBvFtJh+eTJzeAABy9TPV5RhQSXdinWMpcE1+PgeInS yTpaN7g9UexxUps7yD0kDaG4wZLrVrIr/NBqPGwnV3IGaalDqL2OeKd5GHFZ9pmszeG8 6VNyA6FQPcpGQT+eRxsYuelA2j+R6xZLBPFMcrCP6sHix4PoSt24AOWRq4KODFO2wJPL jcHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=5nwMnMw3DbCMTn2Fuh9eAKa97/L+CWpRN1IQSKfIrY8=; b=KyhfM4X86UYelm1xjmX3KL1bAsaVg+AsqkYLOXXXI/zG4Ds9dhF0Ghz9Ue6gxF7JmC LVBRhn5riR4OsGfRoEK3gzc9/xOZOGvc4u9EPMxaC0IXzkRth4D9TDX40jAFkL/1Crmt imgWnP8nOkgXicAKBmASrO8BtppLQT1qhQKg7EW1q31ZBXPUtfLIbNk//tUjkYyBy8jU ub++OZvkS7QA3c3vPcCjw0+3vumyRInj15WqoRXksiFagquImDrYHv579TYE8i8d0+DH yzbiu7OWu1QWp0nbPC1SU+VESgQJiu76O9mGy8bo4Av43zvOQGVMqkaADsTx8bbZ9Kix JzSg== X-Gm-Message-State: AOAM533KUv/e5P3K2g7hIcM88XKQXEBRHaEdLVhKJaZCBNVAw9jwvRnR mflDNxjqjvD0Gtc4OGKO3+IF58LvWt/8Kp3+5bT9HGa6 X-Google-Smtp-Source: ABdhPJzUFIIB7zZacQjcyBgpXBijPyFsFhCW5bngLlBmE5TsUrCisTyt73lEUBKPvEnILxlmIjOz+SnNtKoGYxLdbac= X-Received: by 2002:aed:21da:: with SMTP id m26mr29107739qtc.197.1597085277928; Mon, 10 Aug 2020 11:47:57 -0700 (PDT) MIME-Version: 1.0 References: <20200809172444.16019-1-steve@sk2.org> In-Reply-To: <20200809172444.16019-1-steve@sk2.org> From: Bartosz Golaszewski Date: Mon, 10 Aug 2020 20:47:47 +0200 Message-ID: Subject: Re: [PATCH v2] ARM: davinci: use simple i2c probe function To: Stephen Kitt X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200810_144800_666846_6A63FD26 X-CRM114-Status: GOOD ( 21.26 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: LKML , Sekhar Nori , Russell King , arm-soc , linux-i2c Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sun, Aug 9, 2020 at 7:24 PM Stephen Kitt wrote: > > The i2c probe functions here don't use the id information provided in > their second argument, so the single-parameter i2c probe function > ("probe_new") can be used instead. > > This avoids scanning the identifier tables during probes. > > Signed-off-by: Stephen Kitt > --- > Changes since v1: > - split into per-sub-architecture patches. > > arch/arm/mach-davinci/board-dm644x-evm.c | 5 ++--- > arch/arm/mach-davinci/board-dm646x-evm.c | 10 ++++------ > 2 files changed, 6 insertions(+), 9 deletions(-) > > diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c > index a5d3708fedf6..d0dcf69cc76d 100644 > --- a/arch/arm/mach-davinci/board-dm644x-evm.c > +++ b/arch/arm/mach-davinci/board-dm644x-evm.c > @@ -548,8 +548,7 @@ static const struct property_entry eeprom_properties[] = { > */ > static struct i2c_client *dm6446evm_msp; > > -static int dm6446evm_msp_probe(struct i2c_client *client, > - const struct i2c_device_id *id) > +static int dm6446evm_msp_probe(struct i2c_client *client) > { > dm6446evm_msp = client; > return 0; > @@ -569,7 +568,7 @@ static const struct i2c_device_id dm6446evm_msp_ids[] = { > static struct i2c_driver dm6446evm_msp_driver = { > .driver.name = "dm6446evm_msp", > .id_table = dm6446evm_msp_ids, > - .probe = dm6446evm_msp_probe, > + .probe_new = dm6446evm_msp_probe, > .remove = dm6446evm_msp_remove, > }; > > diff --git a/arch/arm/mach-davinci/board-dm646x-evm.c b/arch/arm/mach-davinci/board-dm646x-evm.c > index 4600b617f9b4..2dce16fff77e 100644 > --- a/arch/arm/mach-davinci/board-dm646x-evm.c > +++ b/arch/arm/mach-davinci/board-dm646x-evm.c > @@ -160,8 +160,7 @@ static struct platform_device davinci_aemif_device = { > #define DM646X_EVM_ATA_PWD BIT(1) > > /* CPLD Register 0 Client: used for I/O Control */ > -static int cpld_reg0_probe(struct i2c_client *client, > - const struct i2c_device_id *id) > +static int cpld_reg0_probe(struct i2c_client *client) > { > if (HAS_ATA) { > u8 data; > @@ -197,7 +196,7 @@ static const struct i2c_device_id cpld_reg_ids[] = { > static struct i2c_driver dm6467evm_cpld_driver = { > .driver.name = "cpld_reg0", > .id_table = cpld_reg_ids, > - .probe = cpld_reg0_probe, > + .probe_new = cpld_reg0_probe, > }; > > /* LEDS */ > @@ -402,8 +401,7 @@ static struct snd_platform_data dm646x_evm_snd_data[] = { > #ifdef CONFIG_I2C > static struct i2c_client *cpld_client; > > -static int cpld_video_probe(struct i2c_client *client, > - const struct i2c_device_id *id) > +static int cpld_video_probe(struct i2c_client *client) > { > cpld_client = client; > return 0; > @@ -424,7 +422,7 @@ static struct i2c_driver cpld_video_driver = { > .driver = { > .name = "cpld_video", > }, > - .probe = cpld_video_probe, > + .probe_new = cpld_video_probe, > .remove = cpld_video_remove, > .id_table = cpld_video_id, > }; > > base-commit: bcf876870b95592b52519ed4aafcf9d95999bc9c > -- > 2.20.1 > Reviewed-by: Bartosz Golaszewski _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel