Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp471159ybx; Wed, 6 Nov 2019 03:36:56 -0800 (PST) X-Google-Smtp-Source: APXvYqze8EcMzdVcsLnJlbhQHVP9hhSvrDB0bj3J2p9zLwiWDj8eJrhx1gVftmj7Ke2uY9/uNddx X-Received: by 2002:aa7:c6c9:: with SMTP id b9mr2047541eds.1.1573040216523; Wed, 06 Nov 2019 03:36:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573040216; cv=none; d=google.com; s=arc-20160816; b=rPzEtyjtQC5Qlbb+s1vp3UgQqxRIOpAQNDE4UzySwVzEsQCUGIR1P9dWgiYy8TAJnR tX/u1iihiOgNnWRmARx83t618PZbbb/YGmvAplr2azYgVH2322s2OzPTuhaRTsR1/tlr mJSBOJ16iezCzdO6Jnj6CVuMHN80nkoRSjWKCyM+zvK3RxAWL4pRIN94dajXY+VQk9/g jc7yoyNAdPERtFgr4+mKcV1AIXVUkZRsJhrsDjUgAQMWW/jN4C9hsnRVLINW3P3BTm1P imvCL4wO8G+mjDFkwel32zt1OSCuGifmjSyW774qG0Uj97V950boavAl8NfwXzEK1jqn GjtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:subject:autocrypt:openpgp:from:references:cc:to; bh=Y5Ko3FXHEAJx/2oK/GIVtcPsS6ZY+KBGvHqEoOg5dUY=; b=NoVigsDL5xMDwc4xPcjG4SNto0Kt4xaVyanHA7FROZoaYAB6/4xyUGZ6gyo5/9u05F 5NIldTDrgO2gTK8c6uot4GqvbOygOD8y4uiO43SY8XZUsF58MSZmLC85lSOnYBwfQ0ZH dxfLY0ujct804QGNih6FUWFxc9wIbrSfabRrN6C7OdxpZGkKtEpBuS/aw/fGIZv47dl2 QsxEpexi/G4gTQfLxGB+TeLN3GCPQAU7vJkxFvEzVLMr0O/oMdKvTP1BoDcxLA8fsfai sPZJO/ify87x0I+WSw1i3NMvhWiTDoEwGhwh4qzs9742ozCXnMuYhlWuC7twOzu6sxiM niAA== 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 l15si10833182ejc.27.2019.11.06.03.36.32; Wed, 06 Nov 2019 03:36:56 -0800 (PST) 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 S1730341AbfKFLde (ORCPT + 99 others); Wed, 6 Nov 2019 06:33:34 -0500 Received: from enpas.org ([46.38.239.100]:45828 "EHLO mail.enpas.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725856AbfKFLde (ORCPT ); Wed, 6 Nov 2019 06:33:34 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) by mail.enpas.org (Postfix) with ESMTPSA id 0B71DFFDB0; Wed, 6 Nov 2019 11:33:30 +0000 (UTC) To: Wolfram Sang , linux-i2c@vger.kernel.org Cc: linux-kernel@vger.kernel.org References: <20191106095033.25182-1-wsa+renesas@sang-engineering.com> <20191106095033.25182-3-wsa+renesas@sang-engineering.com> From: Max Staudt Openpgp: preference=signencrypt Autocrypt: addr=max@enpas.org; prefer-encrypt=mutual; keydata= xsNNBFWfXgEBIADcbJMG2xuJBIVNlhj5AFBwKLZ6GPo3tGxHye+Bk3R3W5uIws3Sxbuj++7R PoWqUkvrdsxJAmnkFgMKx4euW/MCzXXgEQOM2nE0CWR7xmutpoXYc9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LlA56j L7B2x7Mf+vohJx6qS93MVqOLPZo3lvi3QH+ScUNmQNBcLe+sGd8EIJCIMJa9ab8Esx1I8AVr ZVP2hV0XjPJCw/bGp66yYq7dYvvT2wOMk9FUOKCTTBxHEgz5H4LjrA0gJONNrqjI9Hjo8IJU IHKdyyMuKDhs8FkGpx9UTEBMXYasF2J1V9wMJp+JWYEDKQ/ienhXzMpTKeTntPaF3EPcwdmo n6Ro70RlUvNcCNXlosS6KWgXLVZx0xy3cFsF6m4HL3GEXarDm2ub3EatN4nGbknQqzh+1gUG fN1OsIbabwgqrLEUO4tTTE5BKcccjti20S8+3Xn4LCyowrqMREfXDHDT2tStJmi4i8l1NDsf 0deMB5e+8oupffJn64n0qod8e535MEZ8UM244dTv1bR3w9GLWr1eLIF1hOeN6YkRgks7zD1O qowubYXvP+RW4E9h6/NwGzS3Sbw7dRC6HK7xeSjmnzgrbbdF3TbHa5WHGZ3MLFQqbMuSn1Gn a0dBnIpkQG5yGknQjCL7SGEun1siNzluV19nLu66YRJsZ1HE9RgbMhTe2Ca8bWH1985ra4GV urZIw0nz8zec+73Bv/qF4GHHftLYfA== Subject: Re: [RFC PATCH 02/12] i2c: icy: convert to i2c_new_scanned_device Message-ID: <6c979da5-d913-e2d9-9766-478a50d905f7@enpas.org> Date: Wed, 6 Nov 2019 12:33:30 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20191106095033.25182-3-wsa+renesas@sang-engineering.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/06/2019 10:50 AM, Wolfram Sang wrote: > Move from the deprecated i2c_new_probed_device() to the new > i2c_new_scanned_device(). Make use of the new ERRPTR if suitable. > > Signed-off-by: Wolfram Sang > --- > drivers/i2c/busses/i2c-icy.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/i2c/busses/i2c-icy.c b/drivers/i2c/busses/i2c-icy.c > index 8382eb64b424..07baa4d8de39 100644 > --- a/drivers/i2c/busses/i2c-icy.c > +++ b/drivers/i2c/busses/i2c-icy.c > @@ -188,10 +188,10 @@ static int icy_probe(struct zorro_dev *z, > ltc2990_info.fwnode = new_fwnode; > > i2c->ltc2990_client = > - i2c_new_probed_device(&i2c->adapter, > - <c2990_info, > - icy_ltc2990_addresses, > - NULL); > + i2c_new_scanned_device(&i2c->adapter, > + <c2990_info, > + icy_ltc2990_addresses, > + NULL); Looks good, thank you for patching this! i2c_unregister_device() checks the pointer using IS_ERR_OR_NULL(), so the simple logic in i2c-icy (where the pointer is not checked on i2c_new_scanned_device()) still works. Acked-by: Max Staudt