Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp458840imm; Tue, 3 Jul 2018 23:38:55 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfolDdWFsa/I+AR5jrS3M43p6O9YMcSRUxdt/XU1CQCdvMh++tauGQnI6wmctq8zhzPlCLu X-Received: by 2002:a65:4eca:: with SMTP id w10-v6mr746168pgq.13.1530686335534; Tue, 03 Jul 2018 23:38:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530686335; cv=none; d=google.com; s=arc-20160816; b=plvIRAez0aXa35z+6yKgYe61QHte0dEfugU0rh7+7gJsPcs29oPKbTzIrN+cKKjgc1 Y/PL11FBa5b+HJ5V9ySc3r7Wq58cM0HBQPh0oHiMOL53oPa0E9655ka4AVVbglP+ndQF NYwygZUgXsYhRtyrFBxMWTycA2F4t5i+G1DocVRHoYAc8SZIO9rbgwjNAAej3DF46dv0 E3iYwB7PBrNizWd/2Mh3Zf/AWsJnOfewjNpsIRUkUkhjqKyz0q7t9L2wPBDXZYP0reFD R2w4sBOUCkZR5oWcKrVUKQG/pjoLqR/YJ2jLFhX4W2l/YAkOsJuqCeN1FQxTEpQFzCbD 9rdA== 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=3lFG79tJH3/VvLB/VzeL7w+fbkfm6/WvlTU3GcCZOKM=; b=m5HJMu79dnKpsIOJGzPwFZzmoYSnCK62o1h+bxPyCgTu7u0OK5VjTWtgSuEr8WWlZ6 TzWeVdybohOZyIfj+Uf105P4mso8qDnBOEQMUYlEJTBJPYUZxValXcGoSdrKNpuBCFJ0 B5XgpJSoG3Pji68viCmE+MNu4ghfZ/d+I2H6aqbLBp+WYJBK5i9PjEv525jMwzf34mnB TO7gPTjTKDCe2mjv6sdO4mLc6mui8SE7wnrhAVZj0nki45J3YoU3JZBtbZb5QcOJH494 nXHuVsEgj4ZcR9Tm6LXq+iF8X7IPZ8yrsMDuXvxGgONshBY+OSYL5fXWyKUk1gFr+IhV p6kQ== 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 a16-v6si2712889pga.168.2018.07.03.23.38.40; Tue, 03 Jul 2018 23:38:55 -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 S933332AbeGDGiD (ORCPT + 99 others); Wed, 4 Jul 2018 02:38:03 -0400 Received: from mail.steuer-voss.de ([85.183.69.95]:38978 "EHLO mail.steuer-voss.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753518AbeGDGiB (ORCPT ); Wed, 4 Jul 2018 02:38:01 -0400 X-Virus-Scanned: Debian amavisd-new at mail.steuer-voss.de Received: by mail.steuer-voss.de (Postfix, from userid 1000) id 0BAEC41C92; Wed, 4 Jul 2018 08:37:57 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail.steuer-voss.de (Postfix) with ESMTP id 04ED841C91; Wed, 4 Jul 2018 08:37:57 +0200 (CEST) Date: Wed, 4 Jul 2018 08:37:56 +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 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. So it is necessary for non-DT/ non-ACPI systems and used for fallback matching if no match is found in of_device_ids. > >> >> -static int st_accel_i2c_probe(struct i2c_client *client, >> - const struct i2c_device_id *id) >> +static int st_accel_i2c_probe(struct i2c_client *client) >> { >> struct iio_dev *indio_dev; >> struct st_sensor_data *adata; >> @@ -182,7 +181,7 @@ static struct i2c_driver st_accel_driver = { >> .of_match_table = of_match_ptr(st_accel_of_match), >> .acpi_match_table = ACPI_PTR(st_accel_acpi_match), >> }, >> - .probe = st_accel_i2c_probe, >> + .probe_new = st_accel_i2c_probe, >> .remove = st_accel_i2c_remove, >> .id_table = st_accel_id_table, >> }; >> -- >> 2.17.1 >> > > > >