Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp501653ybl; Tue, 7 Jan 2020 09:49:30 -0800 (PST) X-Google-Smtp-Source: APXvYqxXRN4dtBNQ5+oj8GGjbsUOzk5sYb1C/kO+IIDbWmOGj3Y6de4Q971UqqnE5njyAVafIIe9 X-Received: by 2002:a05:6830:1289:: with SMTP id z9mr967938otp.317.1578419370884; Tue, 07 Jan 2020 09:49:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578419370; cv=none; d=google.com; s=arc-20160816; b=IMsKKI9mp0u9yhMtt+6G6K1P2kWQLBrCL7ljSly5UicM4+GbgUhl3jzAznnFoGJKoe Wrb8HjRbVSE5dzFZtI8jacA2hwkTsD2PJp69+iDo1aPxYV9taPvIDSatWIary3VZZoEx Fg+NiwA7xrjlGbTWonp39md3Zfpfv4q9X9juqBsRH+p9cOwOfjrD0d8miI4zb0Emxh8L JEm9wTaPdW4RpLKuGUvarGbYJDphJzGtfmsUKHbD+Oh0p49zyxy5d+ByCH3mhyCsCHY+ sO8p76lP50KlZnGygSGAI3DEissgJkDB6tUFxOwfEnQGHvh5SksnCkz5O1bQnOoHSry4 LA/w== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=zY4rmpRWZLH1xbPcB5QA6EjG3gMq3AYhXQppnli99bY=; b=J14jxTki5j8jRaaywktkvFNs6vSP4vchHC3dPHM5W5zSmXhmsCneF2slL0mNZoW5xE PXL7bNbUv+hX7hUphuosJZqbFhptjI3BCPwgRbPxqhl91IdlUm6AI41NjCsqUgxUGyeO mYdeDU6e8MqKiucmJ9eFVMJm24hWltvLdLdUtBwiciuPFJ7eiUQIwExBnGGFwyWFJax1 j/b0kQ6y8bYQtfymFHEZyvD/gd2AdD3L3QvXL8smYCfpgV6tEJYX2yoYFSrQZMs/eKoe kOGQcukJvgIeykSYTXiGtRXcqaAj+eMV/AIMnxQUQTFjG1TK1jNl01qKerMWTDeyiGvR MBKg== 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 l16si262621otj.59.2020.01.07.09.49.18; Tue, 07 Jan 2020 09:49:30 -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 S1728633AbgAGRs0 (ORCPT + 99 others); Tue, 7 Jan 2020 12:48:26 -0500 Received: from sauhun.de ([88.99.104.3]:53374 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728553AbgAGRsX (ORCPT ); Tue, 7 Jan 2020 12:48:23 -0500 Received: from localhost (p5486CF8B.dip0.t-ipconnect.de [84.134.207.139]) by pokefinder.org (Postfix) with ESMTPSA id A6D5A2C3949; Tue, 7 Jan 2020 18:48:21 +0100 (CET) From: Wolfram Sang To: linux-i2c@vger.kernel.org Cc: Wolfram Sang , Wolfram Sang , linux-kernel@vger.kernel.org Subject: [PATCH 11/12] docs: i2c: use the new API in 'instantiating-devices.rst' Date: Tue, 7 Jan 2020 18:47:45 +0100 Message-Id: <20200107174748.9616-12-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200107174748.9616-1-wsa+renesas@sang-engineering.com> References: <20200107174748.9616-1-wsa+renesas@sang-engineering.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org i2c_new_device is deprecated, use i2c_new_client_device. Signed-off-by: Wolfram Sang --- Documentation/i2c/instantiating-devices.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Documentation/i2c/instantiating-devices.rst b/Documentation/i2c/instantiating-devices.rst index 875ebe9e78e3..b7b90b1b82f9 100644 --- a/Documentation/i2c/instantiating-devices.rst +++ b/Documentation/i2c/instantiating-devices.rst @@ -98,7 +98,7 @@ tuner, a video decoder, an audio decoder, etc. usually connected to the main chip by the means of an I2C bus. You won't know the number of the I2C bus in advance, so the method 1 described above can't be used. Instead, you can instantiate your I2C devices explicitly. This is done by filling -a struct i2c_board_info and calling i2c_new_device(). +a struct i2c_board_info and calling i2c_new_client_device(). Example (from the sfe4001 network driver):: @@ -110,7 +110,7 @@ Example (from the sfe4001 network driver):: { (...) efx->board_info.hwmon_client = - i2c_new_device(&efx->i2c_adap, &sfe4001_hwmon_info); + i2c_new_client_device(&efx->i2c_adap, &sfe4001_hwmon_info); (...) } @@ -123,7 +123,7 @@ present or not (for example for an optional feature which is not present on cheap variants of a board but you have no way to tell them apart), or it may have different addresses from one board to the next (manufacturer changing its design without notice). In this case, you can call -i2c_new_scanned_device() instead of i2c_new_device(). +i2c_new_scanned_device() instead of i2c_new_client_device(). Example (from the nxp OHCI driver):: @@ -152,7 +152,7 @@ simply gives up. The driver which instantiated the I2C device is responsible for destroying it on cleanup. This is done by calling i2c_unregister_device() on the -pointer that was earlier returned by i2c_new_device() or +pointer that was earlier returned by i2c_new_client_device() or i2c_new_scanned_device(). -- 2.20.1