From patchwork Mon Nov 19 11:01:42 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tushar Behera X-Patchwork-Id: 12923 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 84C0323DFE for ; Mon, 19 Nov 2012 11:07:51 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id 103D3A18EBF for ; Mon, 19 Nov 2012 11:07:50 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so6238285iej.11 for ; Mon, 19 Nov 2012 03:07:50 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:x-gm-message-state; bh=MxsIOZT2VO+G5++/ltJT5ClkvQQIrY7CqOX1dTR67OY=; b=fimJKJqBOMVMV79oehHcQszTqBMbvtYrb4ttwPgJ7iBIauZYwWzWzG23q3KseDhwnf 04/vyzv0XW/GKvJUOW4BOUuWD1qaUeCCujlxIZRbm/LPi0UbG0DJrWw+bbeDrBsNuKqP RCGz5uj2kBGeDAGkUp9ILcJ8y0+YBQL5DfOuZkh9QwrIw8qW0K94u0ltQIzjtkQk5v3b UWQ57sX5L+tpxhpPn1X8uvGcoJKCHA+PFuIuKQceWIGkDJRsGJKlF2Kwv9OMJFw/mrIm 4jL3jehlBNphmEIZL+WktieVM35SfnaElszf+GmOGOKf59LvNXNwIYeciYTfV1YbDyHC jghA== Received: by 10.50.152.137 with SMTP id uy9mr6076068igb.62.1353323270488; Mon, 19 Nov 2012 03:07:50 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.67.148 with SMTP id n20csp142784igt; Mon, 19 Nov 2012 03:07:49 -0800 (PST) Received: by 10.69.16.100 with SMTP id fv4mr26577052pbd.135.1353323269569; Mon, 19 Nov 2012 03:07:49 -0800 (PST) Received: from mail-da0-f49.google.com (mail-da0-f49.google.com [209.85.210.49]) by mx.google.com with ESMTPS id t9si12974699paz.258.2012.11.19.03.07.49 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 19 Nov 2012 03:07:49 -0800 (PST) Received-SPF: neutral (google.com: 209.85.210.49 is neither permitted nor denied by best guess record for domain of tushar.behera@linaro.org) client-ip=209.85.210.49; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.210.49 is neither permitted nor denied by best guess record for domain of tushar.behera@linaro.org) smtp.mail=tushar.behera@linaro.org Received: by mail-da0-f49.google.com with SMTP id v40so1264593dad.22 for ; Mon, 19 Nov 2012 03:07:49 -0800 (PST) Received: by 10.68.231.69 with SMTP id te5mr37454767pbc.81.1353323269256; Mon, 19 Nov 2012 03:07:49 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id ve6sm6057964pbc.58.2012.11.19.03.07.46 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 19 Nov 2012 03:07:48 -0800 (PST) From: Tushar Behera To: linux-i2c@vger.kernel.org Cc: w.sang@pengutronix.de, patches@linaro.org Subject: [PATCH] i2c-core: Remove definition of i2c_smbus_process_call Date: Mon, 19 Nov 2012 16:31:42 +0530 Message-Id: <1353322902-3059-1-git-send-email-tushar.behera@linaro.org> X-Mailer: git-send-email 1.7.4.1 X-Gm-Message-State: ALoCoQmFceBSB3ZZPIyDsViUWUKfIIdK3hYWyYSSIpKnSUyXhhREE8rrzyyTxmspoHZFYWLeuTIM i2c_smbus_process_call has no users in the kernel, so this can be removed. Documentation for the same has been updated accordingly. Fixes following sparse warning. drivers/i2c/i2c-core.c:1871:5: warning: symbol 'i2c_smbus_process_call' was not declared. Should it be static? Signed-off-by: Tushar Behera --- Documentation/i2c/writing-clients | 4 ++-- drivers/i2c/i2c-core.c | 23 ----------------------- 2 files changed, 2 insertions(+), 25 deletions(-) diff --git a/Documentation/i2c/writing-clients b/Documentation/i2c/writing-clients index 3a94b0e..51059f7 100644 --- a/Documentation/i2c/writing-clients +++ b/Documentation/i2c/writing-clients @@ -365,8 +365,6 @@ in terms of it. Never use this function directly! s32 i2c_smbus_read_word_data(struct i2c_client *client, u8 command); s32 i2c_smbus_write_word_data(struct i2c_client *client, u8 command, u16 value); - s32 i2c_smbus_process_call(struct i2c_client *client, - u8 command, u16 value); s32 i2c_smbus_read_block_data(struct i2c_client *client, u8 command, u8 *values); s32 i2c_smbus_write_block_data(struct i2c_client *client, @@ -383,6 +381,8 @@ be added back later if needed: s32 i2c_smbus_write_quick(struct i2c_client *client, u8 value); s32 i2c_smbus_block_process_call(struct i2c_client *client, u8 command, u8 length, u8 *values); + s32 i2c_smbus_process_call(struct i2c_client *client, + u8 command, u16 value); All these transactions return a negative errno value on failure. The 'write' transactions return 0 on success; the 'read' transactions return the read diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index a7edf98..b4c4028 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c @@ -1860,29 +1860,6 @@ s32 i2c_smbus_write_word_data(const struct i2c_client *client, u8 command, EXPORT_SYMBOL(i2c_smbus_write_word_data); /** - * i2c_smbus_process_call - SMBus "process call" protocol - * @client: Handle to slave device - * @command: Byte interpreted by slave - * @value: 16-bit "word" being written - * - * This executes the SMBus "process call" protocol, returning negative errno - * else a 16-bit unsigned "word" received from the device. - */ -s32 i2c_smbus_process_call(const struct i2c_client *client, u8 command, - u16 value) -{ - union i2c_smbus_data data; - int status; - data.word = value; - - status = i2c_smbus_xfer(client->adapter, client->addr, client->flags, - I2C_SMBUS_WRITE, command, - I2C_SMBUS_PROC_CALL, &data); - return (status < 0) ? status : data.word; -} -EXPORT_SYMBOL(i2c_smbus_process_call); - -/** * i2c_smbus_read_block_data - SMBus "block read" protocol * @client: Handle to slave device * @command: Byte interpreted by slave