From patchwork Fri Feb 19 12:42:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Berger X-Patchwork-Id: 8360541 Return-Path: X-Original-To: patchwork-tpmdd-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 697C2C0555 for ; Fri, 19 Feb 2016 12:42:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A597C20499 for ; Fri, 19 Feb 2016 12:42:29 +0000 (UTC) Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4D8372049E for ; Fri, 19 Feb 2016 12:42:28 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=sfs-ml-3.v29.ch3.sourceforge.com) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1aWkO9-0007UB-TB; Fri, 19 Feb 2016 12:42:25 +0000 Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1aWkO8-0007U4-N7 for tpmdd-devel@lists.sourceforge.net; Fri, 19 Feb 2016 12:42:24 +0000 X-ACL-Warn: Received: from e35.co.us.ibm.com ([32.97.110.153]) by sog-mx-4.v43.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) id 1aWkO7-0000d2-RZ for tpmdd-devel@lists.sourceforge.net; Fri, 19 Feb 2016 12:42:24 +0000 Received: from localhost by e35.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 19 Feb 2016 05:42:18 -0700 Received: from d03dlp03.boulder.ibm.com (9.17.202.179) by e35.co.us.ibm.com (192.168.1.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 19 Feb 2016 05:42:14 -0700 X-IBM-Helo: d03dlp03.boulder.ibm.com X-IBM-MailFrom: stefanb@linux.vnet.ibm.com X-IBM-RcptTo: tpmdd-devel@lists.sourceforge.net Received: from b03cxnp08027.gho.boulder.ibm.com (b03cxnp08027.gho.boulder.ibm.com [9.17.130.19]) by d03dlp03.boulder.ibm.com (Postfix) with ESMTP id DEEA719D8040 for ; Fri, 19 Feb 2016 05:30:11 -0700 (MST) Received: from d03av03.boulder.ibm.com (d03av03.boulder.ibm.com [9.17.195.169]) by b03cxnp08027.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u1JCgEJO33685664 for ; Fri, 19 Feb 2016 05:42:14 -0700 Received: from d03av03.boulder.ibm.com (localhost [127.0.0.1]) by d03av03.boulder.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u1JCgD99029102 for ; Fri, 19 Feb 2016 05:42:14 -0700 Received: from dhcp-9-2-140-43.watson.ibm.com (dhcp-9-2-140-28.watson.ibm.com [9.2.140.28]) by d03av03.boulder.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id u1JCgALI028880; Fri, 19 Feb 2016 05:42:13 -0700 From: Stefan Berger To: tpmdd-devel@lists.sourceforge.net Date: Fri, 19 Feb 2016 07:42:02 -0500 Message-Id: <1455885728-10315-6-git-send-email-stefanb@linux.vnet.ibm.com> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1455885728-10315-1-git-send-email-stefanb@linux.vnet.ibm.com> References: <1455885728-10315-1-git-send-email-stefanb@linux.vnet.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16021912-0013-0000-0000-00001D05191F X-Spam-Score: -0.0 (/) X-Headers-End: 1aWkO7-0000d2-RZ Subject: [tpmdd-devel] [PATCH v3 05/11] tpm: Get rid of module locking X-BeenThere: tpmdd-devel@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: Tpm Device Driver maintainance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: tpmdd-devel-bounces@lists.sourceforge.net X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, HK_RANDOM_ENVFROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Get rid of the locking of the module Signed-off-by: Stefan Berger --- drivers/char/tpm/tpm-chip.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/char/tpm/tpm-chip.c b/drivers/char/tpm/tpm-chip.c index 0561400..fe15637 100644 --- a/drivers/char/tpm/tpm-chip.c +++ b/drivers/char/tpm/tpm-chip.c @@ -57,9 +57,6 @@ int tpm_try_get_ops(struct tpm_chip *chip) if (!chip->ops) goto out_lock; - if (!try_module_get(chip->dev.parent->driver->owner)) - goto out_lock; - return 0; out_lock: up_read(&chip->ops_sem); @@ -77,7 +74,6 @@ EXPORT_SYMBOL_GPL(tpm_try_get_ops); */ void tpm_put_ops(struct tpm_chip *chip) { - module_put(chip->dev.parent->driver->owner); up_read(&chip->ops_sem); put_device(&chip->dev); }