Linux Media Controller development
 help / color / mirror / Atom feed
From: Malcolm Priestley <tvboxspy@gmail.com>
To: linux-media@vger.kernel.org
Subject: [PATCH][_COMPAT_H] git://linuxtv.org/media_build.git Legacy issues
Date: Mon, 17 Jan 2011 22:59:21 +0000	[thread overview]
Message-ID: <1295305161.2162.21.camel@tvboxspy> (raw)

Clean up legacy issues for error free build on Kernel 2.6.37.

Today while testing on Kernel 2.6.35 latest tarball throws error with 
alloc_ordered_workqueue undefined on Kernels less than 2.6.37. defined back to 
create_singlethread_workqueue.

Please test on other kernel versions.

Tested-on 2.6.35/37 by: Malcolm Priestley <tvboxspy@gmail.com>


diff --git a/v4l/compat.h b/v4l/compat.h
index 9e622ce..df98698 100644
--- a/v4l/compat.h
+++ b/v4l/compat.h
@@ -749,6 +749,8 @@ static inline void *vzalloc(unsigned long size)
 
 #endif
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 37)
+
 #if NEED_FLUSH_WORK_SYNC
 #define flush_work_sync(dev)
 #endif
@@ -760,6 +762,14 @@ static inline void *vzalloc(unsigned long size)
 }
 #endif
 
+#define alloc_ordered_workqueue(a,b) create_singlethread_workqueue(a)
+
+#else
+#ifdef CONFIG_PM
+#include <linux/pm_runtime.h>
+#endif
+#endif
+
 #ifndef KEY_10CHANNELSUP
 #define KEY_10CHANNELSUP        0x1b8   /* 10 channels up (10+) */
 #define KEY_10CHANNELSDOWN      0x1b9   /* 10 channels down (10-) */


             reply	other threads:[~2011-01-17 22:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-17 22:59 Malcolm Priestley [this message]
2011-01-18  2:22 ` [PATCH][_COMPAT_H] git://linuxtv.org/media_build.git Legacy issues Andy Walls
2011-01-18 20:49   ` Malcolm Priestley

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=1295305161.2162.21.camel@tvboxspy \
    --to=tvboxspy@gmail.com \
    --cc=linux-media@vger.kernel.org \
    /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