Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1946322imm; Thu, 24 May 2018 03:24:14 -0700 (PDT) X-Google-Smtp-Source: AB8JxZripyrRo3mVdYchy7btIspp2v3X4TUCann0TqLWezAWyf48Bj8aOKYidDIJrsl9+s4Ir1TQ X-Received: by 2002:a65:4188:: with SMTP id a8-v6mr5364495pgq.118.1527157454584; Thu, 24 May 2018 03:24:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527157454; cv=none; d=google.com; s=arc-20160816; b=kVBR6e58wdvZfxrQF64AwdDzCyPwAL/X/JoVpEMx3zRF5PssMsMCbsIR/lnXQnM3dm LYYI4VYzQiMmFykcEyPVvoB87MW3e7g/4r7Lc1zwfLcfvtLEiu5WZYqLLnKCCqVq4CrF fvqlsAJt/UEZWry1JUPA5CPVya/DQbqyhyTBttPpg1aZFmWmFooqfjUHsGqgOhwJuH4B 8K8GHnzRPBuOgHYVf5kFMe86NR/AefUMFAuJ3WJRM7ujk1XrygZ5quPco2zftl0mxf1Z fjuAcg5vDvVQ1cA585OgfRMU3vQCNWkWPUkNafCjvStD+3ChhnLhjiqZ8EZii9njbJwM rMVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=TvzYsSS4xMB9x75+pBuS5Cs6o/abky/dv7bBSe4xJ6c=; b=i0HloeyhsqyHdp34OqaM+bk7hfz8Co+ti/HGPpD4J4dkShPOqTAiwhRFuTiO6amvAM JWk7qJimsOoFbstHPKQzFhNgQgRNSTSOck0zx2L/Qgvplycg7mWrt5ZjZVj+CVjDK5rc t9B0R8JmsCHtIAgQ2o9I2C6C3oqjIb/PAVHrBcQXI12fq0CnrYGnAGL8ZPdnR8QHu9IN wk50msB+V3ARZcegZ3Le/YbOPcpq+zR5X+nQivS3ohThPWs2Gg5CVQuQoc8WhYmBa/go arzSZ8T1d/dS5XYf79J6fnqT+Yk6UHpC5JDQDUFOfB7jV/aE0Rhg2ODmnJ97JrV9Cp/g Dfyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=GUXqoB6n; 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 w127-v6si20918658pfd.313.2018.05.24.03.24.00; Thu, 24 May 2018 03:24:14 -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=@kernel.org header.s=default header.b=GUXqoB6n; 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 S1031129AbeEXKCc (ORCPT + 99 others); Thu, 24 May 2018 06:02:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:48870 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031112AbeEXKC1 (ORCPT ); Thu, 24 May 2018 06:02:27 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4DC0D20870; Thu, 24 May 2018 10:02:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527156146; bh=fqoQQL5yG3dMOMYyAZQIp+WRQIlsoR50VlP62yeejdc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GUXqoB6nMOU6wb3VU3BPXlsx35UTDFTlHU+6daYWE0BfVrguRjm7u0hZi5QFp4IO7 an9wLGaWGBBxJFnEIojeEDbJWSXp0ukFAsCu+G41hO2d1Jbd1bbzn3P0YmAuYM36BQ fwIyaxZP3505jqJgoqlu+NxwcHgQEyVxPunQ7GO4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Brad Love , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 4.16 080/161] media: lgdt3306a: Fix module count mismatch on usb unplug Date: Thu, 24 May 2018 11:38:25 +0200 Message-Id: <20180524093028.135291434@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180524093018.331893860@linuxfoundation.org> References: <20180524093018.331893860@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.16-stable review patch. If anyone has any objections, please let me know. ------------------ From: Brad Love [ Upstream commit 835d66173a38538c072a7c393d02360dcfac8582 ] When used as an i2c device there is a module usage count mismatch on removal, preventing the driver from being used thereafter. dvb_attach increments the usage count so it is properly balanced on removal. On disconnect of Hauppauge SoloHD/DualHD before: lsmod | grep lgdt3306a lgdt3306a 28672 -1 i2c_mux 16384 1 lgdt3306a On disconnect of Hauppauge SoloHD/DualHD after: lsmod | grep lgdt3306a lgdt3306a 28672 0 i2c_mux 16384 1 lgdt3306a Signed-off-by: Brad Love Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/media/dvb-frontends/lgdt3306a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/media/dvb-frontends/lgdt3306a.c +++ b/drivers/media/dvb-frontends/lgdt3306a.c @@ -2169,7 +2169,7 @@ static int lgdt3306a_probe(struct i2c_cl sizeof(struct lgdt3306a_config)); config->i2c_addr = client->addr; - fe = lgdt3306a_attach(config, client->adapter); + fe = dvb_attach(lgdt3306a_attach, config, client->adapter); if (fe == NULL) { ret = -ENODEV; goto err_fe;