Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp156612pxa; Wed, 26 Aug 2020 07:19:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyUrHIcgWTKNW2ZJSlrxhcUeen2E0H3w6EvP4ZKslMy7wic4l3y7IkUF8P3gVeTuxO9fkea X-Received: by 2002:a17:906:71c7:: with SMTP id i7mr15314826ejk.245.1598451572207; Wed, 26 Aug 2020 07:19:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598451572; cv=none; d=google.com; s=arc-20160816; b=CTgbtpy+5AzJBlfooRD9kP6k8O+xlcbArjRbv4ggdwbtgMF8HKixNi8372EihmhNe+ GvoRyJ3BhEbi4f/MMUZ+Ku5lLRQUo+xLVsi5wUOJWrYA/aVPARZHTkjpKQRPoWP2Y5RB EZucOmOeHv9kIarcDF2+zvvpEgYLnTw6A5mwd4j7kDCI8kWxmuXyNM0sPQP2paYOAzK7 YBH4HLHxRT5UgE5Ze63LTwBpR5j/PZ6R1Sg0PmE5352PZ9L/cRKJ/KMbeWl3FjCRKBFN 0sR/H3IMlVLmPXoxRgWcjuSCsbSLpVFyIiyFUumuAfYjVp0cdDJzLyhbFqbJpb9s9d2i h1+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:ironport-sdr:ironport-sdr; bh=w2wDkGCFg8uEFAzkP3GQWBRpnOYsoRi7t3GC2gPPiEc=; b=eKYhE0pQ6Dg2j72eECQA3pxsTNP0+/C2D1VrlyEc6dyj+aG7bpg//rZLC9qLxOISee QkTwYG7PlHsArCeT1mXAPjs1n5HChiyeLAVp/e1fooraZjSLsxB1irCx1yWtNhcPC2FD XVo6BzKnZbewu6Izj+7wWdHYNqpt8E1Q00UAuZ5hzrSc8NqrfWe935q+bux1oGHyY574 VdMmZzXsLJ3wTjWrKNhDgxV3ucXaWpJLldyVCp8Q7SmFZ7aFBxhsHSgtPU5lZYWosWUp LNYqgYn5a+crfkjl0VAjE/WW2fUac61May48dP1Zt8nE7YLe/w6cN1x4/0Ku8iKqD5fQ dSZQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z5si1556862eja.199.2020.08.26.07.19.09; Wed, 26 Aug 2020 07:19:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728247AbgHZJ4X (ORCPT + 99 others); Wed, 26 Aug 2020 05:56:23 -0400 Received: from mga14.intel.com ([192.55.52.115]:17377 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728040AbgHZJ4W (ORCPT ); Wed, 26 Aug 2020 05:56:22 -0400 IronPort-SDR: 4LnHU0G6w3BK24UkRHCRm8lF5V6sG85o+rTWbSvOgxM4X06nqZZxnyVhItDUiEfzFTtSaeQePV pSmoy4xrYOTA== X-IronPort-AV: E=McAfee;i="6000,8403,9724"; a="155524058" X-IronPort-AV: E=Sophos;i="5.76,355,1592895600"; d="scan'208";a="155524058" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Aug 2020 02:56:21 -0700 IronPort-SDR: UFrZ7j1KCaMRxux51wJaYbmjrA+45n6UPGpfFOwS8bKCGGzUwQArZDOf1j4hX7wx1Fb1mrXK6y kjd9YHH6pMQg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,355,1592895600"; d="scan'208";a="329168253" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by orsmga008.jf.intel.com with ESMTP; 26 Aug 2020 02:56:19 -0700 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1kAsAD-00BXGf-IQ; Wed, 26 Aug 2020 12:56:17 +0300 Date: Wed, 26 Aug 2020 12:56:17 +0300 From: Andy Shevchenko To: Sergey Senozhatsky Cc: Wolfram Sang , Mika Westerberg , linux-i2c@vger.kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] i2c: consider devices with of_match_table during i2c device probing Message-ID: <20200826095617.GH1891694@smile.fi.intel.com> References: <20200826042938.3259-1-sergey.senozhatsky@gmail.com> <20200826050851.GA1081@ninjato> <20200826052544.GA500@jagdpanzerIV.localdomain> <20200826095356.GG1891694@smile.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200826095356.GG1891694@smile.fi.intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 26, 2020 at 12:53:56PM +0300, Andy Shevchenko wrote: > On Wed, Aug 26, 2020 at 02:25:44PM +0900, Sergey Senozhatsky wrote: > > On (20/08/26 07:08), Wolfram Sang wrote: ... > You probably meant simply: > > if (!i2c_device_match(dev, dev->driver)) { > > > status = -ENODEV; > > goto put_sync_adapter; > > } > > On the first glance it will work the same way but slightly longer in case of ID > table matching. > > Send a patch! But then the question is why we have this code in the ->probe() at all? ->match() is run before probe by bus core, no? Wolfram? -- With Best Regards, Andy Shevchenko