From patchwork Sun May 9 19:29:10 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 98008 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o49JRdLN031804 for ; Sun, 9 May 2010 19:27:39 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752727Ab0EIT1h (ORCPT ); Sun, 9 May 2010 15:27:37 -0400 Received: from smtp-vbr11.xs4all.nl ([194.109.24.31]:1047 "EHLO smtp-vbr11.xs4all.nl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752295Ab0EIT1g (ORCPT ); Sun, 9 May 2010 15:27:36 -0400 Received: from localhost (cm-84.208.87.21.getinternet.no [84.208.87.21]) by smtp-vbr11.xs4all.nl (8.13.8/8.13.8) with ESMTP id o49JRYjk090227 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 9 May 2010 21:27:35 +0200 (CEST) (envelope-from hverkuil@xs4all.nl) Message-Id: In-Reply-To: References: From: Hans Verkuil Date: Sun, 09 May 2010 21:29:10 +0200 Subject: [PATCH 2/7] [RFC] v4l2-device: add v4l2_prio_state to v4l2_device. To: linux-media@vger.kernel.org X-Virus-Scanned: by XS4ALL Virus Scanner Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Sun, 09 May 2010 19:27:39 +0000 (UTC) diff --git a/drivers/media/video/v4l2-device.c b/drivers/media/video/v4l2-device.c index 2386ae6..86ce0c9 100644 --- a/drivers/media/video/v4l2-device.c +++ b/drivers/media/video/v4l2-device.c @@ -34,6 +34,7 @@ int v4l2_device_register(struct device *dev, struct v4l2_device *v4l2_dev) INIT_LIST_HEAD(&v4l2_dev->subdevs); spin_lock_init(&v4l2_dev->lock); + v4l2_prio_init(&v4l2_dev->prio); v4l2_dev->dev = dev; if (dev == NULL) { /* If dev == NULL, then name must be filled in by the caller */ diff --git a/include/media/v4l2-device.h b/include/media/v4l2-device.h index b497e53..322c377 100644 --- a/include/media/v4l2-device.h +++ b/include/media/v4l2-device.h @@ -49,6 +49,8 @@ struct v4l2_device { spinlock_t lock; /* unique device name, by default the driver name + bus ID */ char name[V4L2_DEVICE_NAME_SIZE]; + /* Device's priority state */ + struct v4l2_prio_state prio; /* notify callback called by some sub-devices. */ void (*notify)(struct v4l2_subdev *sd, unsigned int notification, void *arg);