Received: by 10.213.65.68 with SMTP id h4csp1302981imn; Wed, 21 Mar 2018 07:33:03 -0700 (PDT) X-Google-Smtp-Source: AG47ELvUG/ToX3lohQ3yO9orHnmwx14OxXD+B8w69SFxb0j4VjYRq1F+28mECBuuEEEH7xN4vM0e X-Received: by 10.101.91.3 with SMTP id y3mr14767824pgq.299.1521642783333; Wed, 21 Mar 2018 07:33:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521642783; cv=none; d=google.com; s=arc-20160816; b=iSA9rx5LgmG0UCqaBqesPkhCrBRxO6CKOCLaERh8VsYVaHHj7j/Vlnpb9muEqEKvJM kUlNOyi1fYJHesk3wIK7GF20KoO1YcfdvYNTjVkOjZJz5XkREQD5nX0ljdCgDbT6f+6w wim28bzYWzYuIC35rgj7/HH2ccHAzAF3Ow5rz6MX4vw4NLAztnBAkYfhdZRg6UQBWe9v crGrySOfRox3Np0jgwz1NoQBKbinHmEwBpRV7j54/HB+aE5YsgGzz5Q858mPihWZuRut OguhfyA0LYQy94PpWrWlsUR9uQpLZdpRIZ9V7mC8i9cEf00bJWNYnMcXCdViBTgAQhQ7 YXJQ== 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:to:from :dkim-signature:arc-authentication-results; bh=0TEZLH16W8yl/weNC1Su3/z02Xk9HJCVrXA1uTGII3w=; b=p3qeLq1mjvO3QLwhZ0/LDa2lcg528OdwmmPPW0JDntdyaGvrK2wy4sRUfAICB8lzFH /NGaCdhYWR1A3gswnz07Bs06RRRkJ4QDtoCZjp68qylRKY6qk8M2M8XXj8SRIEp1VVfl RRhGCtTB0ixEqaFA3UWHRaeVCJ+hSJTfw1Mh9YZlXZp5jlfius3gL24PslUa7G9z2EmL XLt3HJMlLW0VRZ58y4rBoeX3TS1DWlMT2Q3Q89npz316VyAWhGv62iFRWwCJiiIs/keu sJb4jjOIwESLKomFpKAbMUx0QiL8ocx+zoA6xTcGHQIfgzPlpnv3DRnF1WrRFHagGduV qIXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@vanguardiasur-com-ar.20150623.gappssmtp.com header.s=20150623 header.b=IZfjRRV1; 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 j5-v6si4178952plt.25.2018.03.21.07.32.49; Wed, 21 Mar 2018 07:33:03 -0700 (PDT) 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; dkim=pass header.i=@vanguardiasur-com-ar.20150623.gappssmtp.com header.s=20150623 header.b=IZfjRRV1; 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 S1752481AbeCUOae (ORCPT + 99 others); Wed, 21 Mar 2018 10:30:34 -0400 Received: from mail-qt0-f193.google.com ([209.85.216.193]:42804 "EHLO mail-qt0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752363AbeCUOaZ (ORCPT ); Wed, 21 Mar 2018 10:30:25 -0400 Received: by mail-qt0-f193.google.com with SMTP id q11so5430530qtl.9 for ; Wed, 21 Mar 2018 07:30:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vanguardiasur-com-ar.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=0TEZLH16W8yl/weNC1Su3/z02Xk9HJCVrXA1uTGII3w=; b=IZfjRRV16/wCcM38y1/iV4kmuk+/jGGxlm3lzaz+nu29Hb/RJshHQgYOddiuCuC7Pu 7BZCCjH6M0yNKzDiBphr1gONeTdgEnOjBsfVjeTOU5XUquuipqqws3t6+Y1cihI4wi9b AhLKwfxQXoRQYf/ktUgXxFQr4xgRPxcZ4O3zVRnAuCJ2e6BChMzy5i57E0qJN1a0ElYO nBnC1A3YYyU2V1Ltvnq2GIB5ugWWEboL+BxLv3FsE8exlNk5yG4BUEv94TzoL23v1jZF kQKD28g8kqASrxSKz33kN6KQSGauF7HyNJcxK8QdZWjYbvo+xXj1mKVw1v1wzL0qcDCD KIXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0TEZLH16W8yl/weNC1Su3/z02Xk9HJCVrXA1uTGII3w=; b=bHaovoqmBSiFtTueuqpvW9zPweSqp9IePOnWE5MOckkJTGgxVui3YnVmvp8mDgV4lU VHw+jGakgQMu74RwfBtHhPb5jc2FU2yyktGl5El1pHX/y2NSNXUarbn10sy8/IYQCXES pWB5mdztQvFY2y3b1eISkHj9ZBMGJDk7CRsa8XMqALIZ09Cae3wJ1YK2B4mz7zVBL2Wx hOp3JWDO27owkzEruz4xPfIww7ETXiBNk6b5skE+PC7EFdJs0ZwJaaUuEdxS/KeRXLt9 iTOQdXtSa1eDikqlcj7PRi+3TBT7cwv5RMARtpf8Xh6cYvJ3r0SSPjFhdyvgClKo2nUH Yvpg== X-Gm-Message-State: AElRT7GGMOiUrEqTqyJYhZkczpDH8woEdZNi2n/INrCUhbOUIxK74Yci s7x+/vGu/jxZf06Sgiw7HKwttA== X-Received: by 10.200.34.59 with SMTP id o56mr30408345qto.103.1521642624935; Wed, 21 Mar 2018 07:30:24 -0700 (PDT) Received: from localhost.localdomain ([190.210.56.45]) by smtp.gmail.com with ESMTPSA id g14sm3118592qtk.71.2018.03.21.07.30.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 21 Mar 2018 07:30:24 -0700 (PDT) From: =?UTF-8?q?Hern=C3=A1n=20Gonzalez?= To: lars@metafoo.de, Michael.Hennerich@analog.com, jic23@kernel.org, knaack.h@gmx.de, pmeerw@pmeerw.net, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, hernan@vanguardiasur.com.ar Subject: [PATCH 07/11] staging: iio: ad7746: Add remove() Date: Wed, 21 Mar 2018 11:28:55 -0300 Message-Id: <1521642539-4845-8-git-send-email-hernan@vanguardiasur.com.ar> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1521642539-4845-1-git-send-email-hernan@vanguardiasur.com.ar> References: <1521642539-4845-1-git-send-email-hernan@vanguardiasur.com.ar> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This allows the driver to be probed and removed as a module. Signed-off-by: HernĂ¡n Gonzalez --- drivers/staging/iio/cdc/ad7746.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/staging/iio/cdc/ad7746.c b/drivers/staging/iio/cdc/ad7746.c index 815573c..8abba71 100644 --- a/drivers/staging/iio/cdc/ad7746.c +++ b/drivers/staging/iio/cdc/ad7746.c @@ -768,6 +768,15 @@ static int ad7746_probe(struct i2c_client *client, return 0; } +static int ad7746_remove(struct i2c_client *client) +{ + struct iio_dev *indio_dev = i2c_get_clientdata(client); + + iio_device_unregister(indio_dev); + + return 0; +} + static const struct i2c_device_id ad7746_id[] = { { "ad7745", 7745 }, { "ad7746", 7746 }, @@ -792,6 +801,7 @@ static struct i2c_driver ad7746_driver = { .of_match_table = of_match_ptr(ad7746_of_match), }, .probe = ad7746_probe, + .remove = ad7746_remove, .id_table = ad7746_id, }; module_i2c_driver(ad7746_driver); -- 2.7.4