Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1978718imm; Thu, 24 May 2018 03:57:37 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpImPqfvclGWbwRwzmpqjieSGewEkbx7kYoZ9Nn6F7jTQ423eI4JHUoFCZL7pNTMwcWuzn5 X-Received: by 2002:a65:590e:: with SMTP id f14-v6mr5428359pgu.282.1527159457605; Thu, 24 May 2018 03:57:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527159457; cv=none; d=google.com; s=arc-20160816; b=TQxkMqEOvSxuDUijGBKBbYEdgKl6vFTm1k2XKuMDJUIhVy/IndAcnDAVFemSuqKYxs A5sY4pxamMuJBVDJknFcPGb7ZIDk9jK7RTpghYn7e8nWt6pLZdvDj5t1qiDV7RxRPSNM +3arkU7Dd31dOtMLecoTLa0FVMhBVPvOtOiWF7888VVWn4gUtr+tkNa9tM4+5ujn3lFR kX3c383mzRQNUEKZ42JjkffVsj9IKhUu6nqSAco577Ac9hzhmPHacThe5jlRP2SreRIr sONrh/gYXQzPN8bMqEIZjBtCnK/dY8KnCJ9EUW3jDb05immNAdYnXlrHu6H7TVRso5pX vO5Q== 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=aIxCn39S4LZrkyWpEKRgkWk7KkjGd/7bF3KZN/m9gbE=; b=NgXalwQqPkvf95ocBpdr+Pwj4ZZ/OfTsaWEDWCXhBtUfl2HKO/4De3RsUzbU5srRNo Ak+FMQtOeYM4sNy8+NkcIXROZi0KCB1VHBZnPV0Ts4SLUaO+Eo6Mmcn7Aga1GFjUjhKm Er4YLumhaf0c0PivBHoy4wPaAOeC9061CgnrHLZ0nNrg+b2gRJCFRrYk7ljg92N+neEg Gny24aqSLhuyz2LoNs5H5iQ0r43XO4TXpUK4fKgSnJUv02qaEtydPV4je0zBm2lgGqhd wnnjPddkfrKA11X+l1/YwMi+ipvFjeNBamaqTcqJ/6AVBR1wvJcqBKSC7chgVydV0IgB 4r8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=DUA21b/G; 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 m26-v6si21555668pfk.56.2018.05.24.03.57.23; Thu, 24 May 2018 03:57:37 -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=DUA21b/G; 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 S1030327AbeEXJ4b (ORCPT + 99 others); Thu, 24 May 2018 05:56:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:36272 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030300AbeEXJ4W (ORCPT ); Thu, 24 May 2018 05:56:22 -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 29D892089F; Thu, 24 May 2018 09:56:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527155781; bh=2cIYMlXQlecqlVtM0yzeLgLOTkgdfxDBTo+cs++bbfs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DUA21b/GxlFyr8aHi7nLIF3a2UE4meuyGikif2ukHX8ctnA5SGC88dE03WDkXlJhy sUvFd27PuNZ9cxasw5uItGH69evsaOTk1ElW6VIlXjpyqQmTWrItLWpfoKNnuOISpR dJeGijE5Eckh7nhFPasLMW/d1EkQHs8ZyiGhZtr0= 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.14 081/165] media: lgdt3306a: Fix module count mismatch on usb unplug Date: Thu, 24 May 2018 11:38:07 +0200 Message-Id: <20180524093625.294215809@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180524093621.979359379@linuxfoundation.org> References: <20180524093621.979359379@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.14-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 @@ -2168,7 +2168,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;