Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp564389imm; Wed, 4 Jul 2018 01:59:32 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcDHVbSiz4EntMLoN37ams4R/AIjZvGW9TnNAZqmSyZQ5Ohsr9Jy3B/KrbnTCIrAIKHP7yL X-Received: by 2002:a17:902:bb05:: with SMTP id l5-v6mr1250337pls.246.1530694772545; Wed, 04 Jul 2018 01:59:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530694772; cv=none; d=google.com; s=arc-20160816; b=KofprY1zZJEWZrPTbu9utSwSaga419Nyio7QVByi9R8F468E0/4WdccsEBWA0Lg0Ql 33PV6ewneOZ9dmdDOuWTQZ/cx2IzsOBDslyoPpB4fzcwtc7lNYA9V/Qn0N0wdPuqU8yg xnYNWU5aDHo+Ya4uzjPe98olcV4Hf28Dc7ydxdy3oU5k1WggY0m4xCWe8GMr2kyJYsYL tsTYcjWQ+RX4bZWcWxjBYjEYJEThvYxAkqhbI6Vj9D/gmeK6o8tecefpMuOtnzSs98Oo CaucS1kI86tk8ofOh12Q+EeNUCmMbQSMd7J93xxT6oNXSx9GRibZuSQStEQ496FydeEI /9+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=f788dIF0nlLNs87FISDVoL3IT8MwJRoSn3qv/zepE8M=; b=S1tWB4csI1gVe0An2u+DNSwze6x7kzalmQZQqJJ87FRQzn3SW4DBD7xI3ov967/oKj Wk8dW+2LS2t8eCqMc77FeHEMstsyCVErGsXVhT5311qhqNzmkrxCUcjSYP8N8Gcgx70e swLy6DzTLhcgg1qOodEpXhKN+I/B6PiSo9uPiC9tNpyztWZ78QnVsjTizZbEHSqVermU XpSfzGHH4EHNQ4ho0rlV99KScZsAVVEaDMSvBXiGzaYUNMZq7GoHdr/r8AARCypwEOEd bb0nc5XZyBIlwwcNTm1kAryg4PgxRX3gppJIDv9NCfcleMo1RrNI6mJGW6+DhMPYEaj8 IPWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XXhe5CAl; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q74-v6si3080402pfa.272.2018.07.04.01.59.17; Wed, 04 Jul 2018 01:59:32 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XXhe5CAl; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934239AbeGDI6Y (ORCPT + 99 others); Wed, 4 Jul 2018 04:58:24 -0400 Received: from mail-vk0-f67.google.com ([209.85.213.67]:40547 "EHLO mail-vk0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932324AbeGDI6V (ORCPT ); Wed, 4 Jul 2018 04:58:21 -0400 Received: by mail-vk0-f67.google.com with SMTP id s23-v6so2686154vks.7; Wed, 04 Jul 2018 01:58:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=f788dIF0nlLNs87FISDVoL3IT8MwJRoSn3qv/zepE8M=; b=XXhe5CAlrTrGn3opuvv0j5HwsIcrKtnYch1KHik9iH5SfO7fRPRww8c9J/Ig6pJAzO tkYik3+5xFt4EmG5pbZyfTU6m6Szbu5IJnPL94O9cW4CYpIiUxyn69nOqH1T/Qj2L6RQ Qyk6N4bNWfMT2J4aOf1ApPt5+Z2/DsMTqiQi3LGW7YaHfsgXE+8smpjK3vSRZ9KOA/Hs ajP7ZRBRtvyDBgwiuu8KeH9OmLHNY6pT8lUXFDy8KSlS7MJsgJkdoyOgaAaOfbkVDNCh liG2bO1doDzCqam0+tPS9n2INyn0DdZo9xKjqHciFgprjsue869JnXnUO6qGlr0UzYTy ofLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=f788dIF0nlLNs87FISDVoL3IT8MwJRoSn3qv/zepE8M=; b=HBrHtI97IWQpi5vXQiFgB9/3t9oIuQ9y4abcVAV2X0cLRZDIEzF52v26EzFIZF3Qri NNJ13vOa0qpEDtrr4DwWV9ZDWSqWt9xX0AXSKsH9vRFK9Yv1EmcHujl0LChFJmYd++mD 2GO8eLhW1cw6XBOovOWTSF7nLGNLIb0UIVQdmzusVttEUu9TjrE+y7mGPDptCdamOMBr XdwxEWnTKX2oc6TynOm8K5KFcBhqFCDJxrL5bn8VDhF9ZAxDhzsMIF9Xh0AWzu60RX9J 8vgxIcVf0aK5yM7zWW91T765/vuZsd2SdxHO5jpH8sZiIu7+yrZsCnQskcRnaX+VnB6E ib1A== X-Gm-Message-State: APt69E0nIVclge1efIEMx73OH5XKwmzrEIyS9IyfQtCPq7MWHLwoAY7j G4P+BuIRaUWFHcqtU1x+/nL1/vVqFjwmcWImQak= X-Received: by 2002:a1f:7d09:: with SMTP id y9-v6mr569716vkc.15.1530694700318; Wed, 04 Jul 2018 01:58:20 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a67:2149:0:0:0:0:0 with HTTP; Wed, 4 Jul 2018 01:58:19 -0700 (PDT) In-Reply-To: References: <82c6f53cfa03f9bc7c0adfc423ae65fc986a1d25.1530599660.git.nikolaus.voss@loewensteinmedical.de> From: Andy Shevchenko Date: Wed, 4 Jul 2018 11:58:19 +0300 Message-ID: Subject: Re: [PATCH v2 2/2] IIO: st_accel_i2c.c: Use probe_new() instead of probe() To: Nikolaus Voss 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 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 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? > So it is necessary for non-DT/ non-ACPI systems and used for > fallback matching if no match is found in of_device_ids. -- With Best Regards, Andy Shevchenko