linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Magnus Damm <magnus.damm@gmail.com>
To: video4linux-list@redhat.com
Cc: linux-sh@vger.kernel.org, akpm@linux-foundation.org,
	lethal@linux-sh.org, mchehab@infradead.org
Subject: [PATCH 01/07] soc_camera: Remove default spinlock operations
Date: Tue, 01 Jul 2008 12:46:48 +0000	[thread overview]
Message-ID: <20080701124648.30446.87596.sendpatchset@rx1.opensource.se> (raw)
In-Reply-To: <20080701124638.30446.81449.sendpatchset@rx1.opensource.se>

This patch removes the default spinlock_alloc() and spinlock_free()
functions. The pxa_camera.c driver is providing it's own spinlock
callbacks anyway. With this patch spinlock callbacks are required
when registering the host.

This is ground work for the next per-host videobuf queue patch.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
---

 drivers/media/video/soc_camera.c |   23 ++---------------------
 1 file changed, 2 insertions(+), 21 deletions(-)

--- 0001/drivers/media/video/soc_camera.c
+++ work/drivers/media/video/soc_camera.c	2008-06-12 14:05:36.000000000 +0900
@@ -776,27 +776,13 @@ static void dummy_release(struct device 
 {
 }
 
-static spinlock_t *spinlock_alloc(struct soc_camera_file *icf)
-{
-	spinlock_t *lock = kmalloc(sizeof(spinlock_t), GFP_KERNEL);
-
-	if (lock)
-		spin_lock_init(lock);
-
-	return lock;
-}
-
-static void spinlock_free(spinlock_t *lock)
-{
-	kfree(lock);
-}
-
 int soc_camera_host_register(struct soc_camera_host *ici)
 {
 	int ret;
 	struct soc_camera_host *ix;
 
-	if (!ici->vbq_ops || !ici->ops->add || !ici->ops->remove)
+	if (!ici->vbq_ops || !ici->ops->add || !ici->ops->remove
+	    || !ici->ops->spinlock_alloc)
 		return -EINVAL;
 
 	/* Number might be equal to the platform device ID */
@@ -821,11 +807,6 @@ int soc_camera_host_register(struct soc_
 	if (ret)
 		goto edevr;
 
-	if (!ici->ops->spinlock_alloc) {
-		ici->ops->spinlock_alloc = spinlock_alloc;
-		ici->ops->spinlock_free = spinlock_free;
-	}
-
 	scan_add_host(ici);
 
 	return 0;

  reply	other threads:[~2008-07-01 12:46 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-01 12:46 [PATCH 00/07] soc_camera: SuperH Mobile CEU support Magnus Damm
2008-07-01 12:46 ` Magnus Damm [this message]
2008-07-01 12:46 ` [PATCH 02/07] soc_camera: Let the host select videobuf_queue type Magnus Damm
2008-07-01 20:02   ` [PATCH 02/07] soc_camera: Let the host select videobuf_queue Guennadi Liakhovetski
2008-07-02  2:50     ` [PATCH 02/07] soc_camera: Let the host select videobuf_queue type Magnus Damm
2008-07-02  7:27   ` [PATCH 02/07] soc_camera: Let the host select videobuf_queue Paulius Zaleckas
2008-07-01 12:47 ` [PATCH 03/07] soc_camera: Remove vbq_ops and msize Magnus Damm
2008-07-01 12:47 ` [PATCH 04/07] soc_camera: Remove unused file lock pointer Magnus Damm
2008-07-01 12:47 ` [PATCH 05/07] soc_camera: Add 16-bit bus width support Magnus Damm
2008-07-01 12:47 ` [PATCH 06/07] videobuf: Add physically contiguous queue code Magnus Damm
2008-07-02  7:43   ` Paulius Zaleckas
     [not found]     ` <aec7e5c30807020232j1181ba9s43bc0e6920b18733@mail.gmail.com>
2008-07-02 10:42       ` Paulius Zaleckas
2008-07-04  9:08   ` Paulius Zaleckas
2008-07-01 12:47 ` [PATCH 07/07] sh_mobile_ceu_camera: Add SuperH Mobile CEU driver Magnus Damm
2008-07-01 20:07   ` Guennadi Liakhovetski
2008-07-02  3:08     ` Magnus Damm

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=20080701124648.30446.87596.sendpatchset@rx1.opensource.se \
    --to=magnus.damm@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=lethal@linux-sh.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=mchehab@infradead.org \
    --cc=video4linux-list@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).