Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp575181imm; Wed, 4 Jul 2018 02:11:38 -0700 (PDT) X-Google-Smtp-Source: AAOMgpexl85nBvxNvoh1OhG680CErLkdZ5AMIU81QTWXhiGMvUoy2zO0see1fdAL2Yj+1ahFlXZZ X-Received: by 2002:a65:6252:: with SMTP id q18-v6mr1191185pgv.106.1530695498817; Wed, 04 Jul 2018 02:11:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530695498; cv=none; d=google.com; s=arc-20160816; b=0QtS14qNngBeUTQLHG4jqfxd2JxzUQq5c6bT0l/HWuuwhll9xHm/hUkEVM2tvRaNG/ Ruq08zXaarmj43J3aVw36sGeP1AknXH8QBRMkcrGE1GyWBj/bpLCpZ4SQtpfLb8TWhVq RGEMWPG95SadfepQB16mRxI3zYpNE9807b3vpZnUPVVCgULfYyAj2tut5tUSUxHdteX/ UwXeWKM1f/hu2JAqV11TSbPYJndZexjf5V1stmyfzp8DEo9OSmwqWj4WUWm8W1qw/zSg oCwjsDva80QxiElNjc3XGIADV1X32Yr7QDhFjw4hfyG1CePFy7q+gDNZCMTN6UkxWn/D kTtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=HtEm0MALMb32j2uVDMQ4dSdCWKNZCAm0rW4dixcRVN8=; b=Xnp1gxLraN6+Q6P9xYsxpJoU+MXNauUu/99Nwu+5w0VTQpKZW3zTbl/nyCc3XD04d4 93vB72vCwqqUJU7iL++fDAoRbbvOobqR8bFp0NrhESRSipPmI1mu3PV9Hj77T4lj7i4n iGQwff5rgsYiK+KxsBTgLBtkU2IZwKIJT0mCZDtq/U5E0bf9bNtRCKcVWd8MVZfNnJG5 UE6NhwE6gK+37JqMDKwdfNkJ6mAkKE37N9WvtL6Cm+UK2UaS95EbaqfqlNlHt+/BBA/H vvByY5JX8ulSwTWRbtpyLlpIiY2wjctClPrFb4ytFCVCFo31BS6l9yF9ut8Wy2HiFfFJ qNMQ== 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 j10-v6si2784895pgq.503.2018.07.04.02.11.24; Wed, 04 Jul 2018 02:11:38 -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 S934211AbeGDJKB (ORCPT + 99 others); Wed, 4 Jul 2018 05:10:01 -0400 Received: from mail.steuer-voss.de ([85.183.69.95]:41166 "EHLO mail.steuer-voss.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932517AbeGDJJ6 (ORCPT ); Wed, 4 Jul 2018 05:09:58 -0400 X-Virus-Scanned: Debian amavisd-new at mail.steuer-voss.de Received: by mail.steuer-voss.de (Postfix, from userid 1000) id D54F341AA1; Wed, 4 Jul 2018 11:09:53 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail.steuer-voss.de (Postfix) with ESMTP id CA77F41A9D; Wed, 4 Jul 2018 11:09:53 +0200 (CEST) Date: Wed, 4 Jul 2018 11:09:53 +0200 (CEST) From: Nikolaus Voss X-X-Sender: nv@fox.voss.local To: Andy Shevchenko cc: Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Lorenzo Bianconi , Linus Walleij , Xiongfeng Wang , linux-iio@vger.kernel.org, Linux Kernel Mailing List , nv@vosn.de Subject: Re: [PATCH v2 2/2] IIO: st_accel_i2c.c: Use probe_new() instead of probe() In-Reply-To: Message-ID: References: <82c6f53cfa03f9bc7c0adfc423ae65fc986a1d25.1530599660.git.nikolaus.voss@loewensteinmedical.de> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 4 Jul 2018, Andy Shevchenko wrote: > On Wed, Jul 4, 2018 at 9:37 AM, Nikolaus Voss > wrote: >> On Wed, 4 Jul 2018, Andy Shevchenko wrote: >>> >>> On Tue, Jul 3, 2018 at 9:06 AM, Nikolaus Voss >>> wrote: >>>> >>>> struct i2c_device_id argument of probe() is not used, so use probe_new() >>>> instead. >>>> >>> >>> This makes... >>> >>>> MODULE_DEVICE_TABLE(i2c, st_accel_id_table); >>> >>> >>> ...this table obsolete IIUC. At least that's what I did when switched >>> to ->probe_new() in some drivers. >>> >>> If I'm mistaken (again? :-) ) I would hear from someone to point me >>> how it can be used after a switch. >> >> >> It is still used by the i2c-core in i2c_device_match() if DT and ACPI >> matching fails. > >> And it is used to create the corresponding modaliases for >> driver loading. > > My question is "How?!" > I don't really see any points to match against it after switching to > ->probe_new(). > > Could you point me to the code path in i2c (or OF?) core for that? As written above in i2c-core-base.c: i2c_device_match() -> i2c_match_id(driver->id_table,... This is used for driver matching before probe() or probe_new() of the device driver can be called. probe_new() actually is a function signature change only. Niko