From patchwork Fri Mar 28 14:35:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sakari Ailus X-Patchwork-Id: 3903901 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id CA57F9F2E8 for ; Fri, 28 Mar 2014 14:36:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0940C202FF for ; Fri, 28 Mar 2014 14:36:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D7D21202FE for ; Fri, 28 Mar 2014 14:36:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751466AbaC1OgD (ORCPT ); Fri, 28 Mar 2014 10:36:03 -0400 Received: from mga02.intel.com ([134.134.136.20]:17264 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751304AbaC1OgB (ORCPT ); Fri, 28 Mar 2014 10:36:01 -0400 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP; 28 Mar 2014 07:36:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,751,1389772800"; d="scan'208";a="501706021" Received: from paasikivi.fi.intel.com ([10.237.72.42]) by fmsmga001.fm.intel.com with ESMTP; 28 Mar 2014 07:35:44 -0700 Received: from nauris.fi.intel.com (nauris.localdomain [192.168.240.2]) by paasikivi.fi.intel.com (Postfix) with ESMTP id D78ED20994 for ; Fri, 28 Mar 2014 16:35:43 +0200 (EET) Received: by nauris.fi.intel.com (Postfix, from userid 1000) id 211DC2009D; Fri, 28 Mar 2014 16:35:50 +0200 (EET) From: Sakari Ailus To: linux-media@vger.kernel.org Subject: [PATCH 2/3] smiapp: Set sub-device owner Date: Fri, 28 Mar 2014 16:35:12 +0200 Message-Id: <1396017313-3990-3-git-send-email-sakari.ailus@linux.intel.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1396017313-3990-1-git-send-email-sakari.ailus@linux.intel.com> References: <1396017313-3990-1-git-send-email-sakari.ailus@linux.intel.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, 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 The smiapp driver is the owner of the sub-devices exposed by the smiapp driver. This prevents unloading the module whilst it's in use. Signed-off-by: Sakari Ailus --- drivers/media/i2c/smiapp/smiapp-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c index 69c11ec..5179cf4 100644 --- a/drivers/media/i2c/smiapp/smiapp-core.c +++ b/drivers/media/i2c/smiapp/smiapp-core.c @@ -2569,7 +2569,7 @@ static int smiapp_registered(struct v4l2_subdev *subdev) this->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; this->sd.internal_ops = &smiapp_internal_ops; - this->sd.owner = NULL; + this->sd.owner = THIS_MODULE; v4l2_set_subdevdata(&this->sd, client); rval = media_entity_init(&this->sd.entity,