All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: linux-media@vger.kernel.org
Cc: sakari.ailus@maxwell.research.nokia.com
Subject: [PATCH v7 2/6] v4l: subdev: Don't require core operations
Date: Mon, 14 Feb 2011 13:20:55 +0100	[thread overview]
Message-ID: <1297686059-9622-3-git-send-email-laurent.pinchart@ideasonboard.com> (raw)
In-Reply-To: <1297686059-9622-1-git-send-email-laurent.pinchart@ideasonboard.com>

There's no reason to require subdevices to implement the core
operations. Remove the check for non-NULL core operations when
initializing the subdev.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 include/media/v4l2-subdev.h |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h
index daf1e57..2f2dea2 100644
--- a/include/media/v4l2-subdev.h
+++ b/include/media/v4l2-subdev.h
@@ -479,8 +479,7 @@ static inline void v4l2_subdev_init(struct v4l2_subdev *sd,
 					const struct v4l2_subdev_ops *ops)
 {
 	INIT_LIST_HEAD(&sd->list);
-	/* ops->core MUST be set */
-	BUG_ON(!ops || !ops->core);
+	BUG_ON(!ops);
 	sd->ops = ops;
 	sd->v4l2_dev = NULL;
 	sd->flags = 0;
-- 
1.7.3.4


  parent reply	other threads:[~2011-02-14 12:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-14 12:20 [PATCH v7 0/6] V4L2 subdev userspace API Laurent Pinchart
2011-02-14 12:20 ` [PATCH v7 1/6] v4l: Share code between video_usercopy and video_ioctl2 Laurent Pinchart
2011-02-14 12:20 ` Laurent Pinchart [this message]
2011-02-14 12:20 ` [PATCH v7 3/6] v4l: subdev: Add device node support Laurent Pinchart
2011-02-14 12:45   ` Hans Verkuil
2011-02-14 12:56     ` Laurent Pinchart
2011-02-14 12:20 ` [PATCH v7 4/6] v4l: subdev: Uninline the v4l2_subdev_init function Laurent Pinchart
2011-02-14 12:20 ` [PATCH v7 5/6] v4l: subdev: Control ioctls support Laurent Pinchart
2011-02-14 12:20 ` [PATCH v7 6/6] v4l: subdev: Events support Laurent Pinchart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1297686059-9622-3-git-send-email-laurent.pinchart@ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=sakari.ailus@maxwell.research.nokia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.