Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1478098ybt; Mon, 15 Jun 2020 01:00:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwPlUDKoNLaO0NhuulWbLHGq4mNFERbZ90S7d/mnEV9FFu6IdO5yUNey4N1PsGsDWD63ROS X-Received: by 2002:a17:906:68ca:: with SMTP id y10mr24110681ejr.322.1592208055446; Mon, 15 Jun 2020 01:00:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592208055; cv=none; d=google.com; s=arc-20160816; b=EpJpvLObjrr0+ve1fqDhCoDlpGAXjg+Tp8lkiXd9r5rYDQ/qigBqhSPwNlKiQ4FOyo cz7vRwcmsvJyrBkHBHLzSxyz2Xdq8PVEpBArITU6RSI9JnkfCY1PHlkMWX2C6NrkrQNo ID48CGH10TyZ+/mbTNmkpYccos/u2VR1wgwP6ReB9GYCWV9+GxTU2k9/I+lA2rGElyGH PF7lEsNHDq3aHTek/hn3XB4l/aHJ1BXO2lzNu3sRwG8xBJc7/bXfAvNawVn+5mmNciNQ bpUavRXp2Vlx8M7nDrk8WJzsmWgEcBsTCAJPyq8toQ3sWNmm/GIC0zhObb7ziXzGh7JE V/ng== 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 :dkim-signature; bh=/whoHGMyXhMJaRkZtSgTmYlMyKBm1GPpJ8ghlAWstXE=; b=q72gPlJgcuZwBGWtVOws6jhDgy3OE8MdV9TG/Ag7bF2m79CQLKL3q/IQ/hw65+AGyw KZ314BhC+y85+w7bYvHAKRqDWy7A6QdQBC3HK4n0K3sWahiu3sydcZ7+3IU+/xFiyaXL hGyFdkg+GZluFMgvO8HDm7O0cGZwv3lmtX/+lazY15EyDEu74ThcOohWgam5cZFsAAOm lBPXFrF/76tqi8MflFwUD4q7J2gtYLemYNkLIbQ7ObYIu/u17q3Z+Bd131bUbgYaGbAx BXns+SHf3kAdDJ3RQbN7QznmY4MDPkCBcPQ/657CuL0ntSxSIOEywpXsmJWtcWCridu3 MiYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@sang-engineering.com header.s=k1 header.b=uEPFAeAM; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x72si8174563ede.303.2020.06.15.01.00.33; Mon, 15 Jun 2020 01:00:55 -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; dkim=fail (test mode) header.i=@sang-engineering.com header.s=k1 header.b=uEPFAeAM; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728870AbgFOH6k (ORCPT + 99 others); Mon, 15 Jun 2020 03:58:40 -0400 Received: from www.zeus03.de ([194.117.254.33]:49270 "EHLO mail.zeus03.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728875AbgFOH6g (ORCPT ); Mon, 15 Jun 2020 03:58:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=sang-engineering.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=k1; bh=L544mEjG3aL5/0 34ANdVIlg9WBObk6nWQy0P1oUfcjs=; b=uEPFAeAM6xxRo8E+TVrae+0qOue1qP 0BKLSNF5eyASLIfdhlhJtk9Bo52uvJtUubf7EwveIAZ20lQWUPA6HrUWSy1XPg7B Mdqbpn6QjxxW3CzTnWEVuWUAe41/RxaqORP31WiElPoWJFUGMRcz67ediXOQ2NIZ 3G7afBJDSdFA4= Received: (qmail 989328 invoked from network); 15 Jun 2020 09:58:30 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 15 Jun 2020 09:58:30 +0200 X-UD-Smtp-Session: l3s3148p1@2FruyhqoErYgAwDPXwRdAFnN6pRlEuNX From: Wolfram Sang To: linux-i2c@vger.kernel.org Cc: Wolfram Sang , Wolfram Sang , linux-kernel@vger.kernel.org Subject: [PATCH 6/6] i2c: remove deprecated i2c_new_device API Date: Mon, 15 Jun 2020 09:58:15 +0200 Message-Id: <20200615075816.2848-7-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200615075816.2848-1-wsa+renesas@sang-engineering.com> References: <20200615075816.2848-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 All in-tree users have been converted to the new i2c_new_client_device function, so remove this deprecated one. Signed-off-by: Wolfram Sang --- I'd like to push it via I2C for 5.8-rc2. drivers/i2c/i2c-core-base.c | 25 ------------------------- include/linux/i2c.h | 8 +++----- 2 files changed, 3 insertions(+), 30 deletions(-) diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c index d1f278f73011..26f03a14a478 100644 --- a/drivers/i2c/i2c-core-base.c +++ b/drivers/i2c/i2c-core-base.c @@ -815,31 +815,6 @@ i2c_new_client_device(struct i2c_adapter *adap, struct i2c_board_info const *inf } EXPORT_SYMBOL_GPL(i2c_new_client_device); -/** - * i2c_new_device - instantiate an i2c device - * @adap: the adapter managing the device - * @info: describes one I2C device; bus_num is ignored - * Context: can sleep - * - * This deprecated function has the same functionality as - * @i2c_new_client_device, it just returns NULL instead of an ERR_PTR in case of - * an error for compatibility with current I2C API. It will be removed once all - * users are converted. - * - * This returns the new i2c client, which may be saved for later use with - * i2c_unregister_device(); or NULL to indicate an error. - */ -struct i2c_client * -i2c_new_device(struct i2c_adapter *adap, struct i2c_board_info const *info) -{ - struct i2c_client *ret; - - ret = i2c_new_client_device(adap, info); - return IS_ERR(ret) ? NULL : ret; -} -EXPORT_SYMBOL_GPL(i2c_new_device); - - /** * i2c_unregister_device - reverse effect of i2c_new_*_device() * @client: value returned from i2c_new_*_device() diff --git a/include/linux/i2c.h b/include/linux/i2c.h index c10617bb980a..b8b8963f8bb9 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h @@ -408,7 +408,7 @@ static inline bool i2c_detect_slave_mode(struct device *dev) { return false; } * that are present. This information is used to grow the driver model tree. * For mainboards this is done statically using i2c_register_board_info(); * bus numbers identify adapters that aren't yet available. For add-on boards, - * i2c_new_device() does this dynamically with the adapter already known. + * i2c_new_client_device() does this dynamically with the adapter already known. */ struct i2c_board_info { char type[I2C_NAME_SIZE]; @@ -439,13 +439,11 @@ struct i2c_board_info { #if IS_ENABLED(CONFIG_I2C) -/* Add-on boards should register/unregister their devices; e.g. a board +/* + * Add-on boards should register/unregister their devices; e.g. a board * with integrated I2C, a config eeprom, sensors, and a codec that's * used in conjunction with the primary hardware. */ -struct i2c_client * -i2c_new_device(struct i2c_adapter *adap, struct i2c_board_info const *info); - struct i2c_client * i2c_new_client_device(struct i2c_adapter *adap, struct i2c_board_info const *info); -- 2.27.0