The patch number 9276 was added via Mauro Carvalho Chehab <[EMAIL PROTECTED]>
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
        [EMAIL PROTECTED]

------

From: Mauro Carvalho Chehab  <[EMAIL PROTECTED]>
videobuf-dvb: two functions are now static


This patch marks those two functions as static:
        static int videobuf_dvb_register_adapter(struct videobuf_dvb_frontends 
*fe,
        static int videobuf_dvb_register_frontend(struct dvb_adapter *adapter,

Since MFE patches changed their calls by videobuf_dvb_register_bus.

To avoid having to declare the prototypes, the patch moves
videobuf_dvb_register_bus() to be after the declaration of the above functions
used there.

Priority: normal

CC: Steven Toth <[EMAIL PROTECTED]>
Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>


---

 linux/drivers/media/video/videobuf-dvb.c |  108 ++++++++++-------------
 linux/include/media/videobuf-dvb.h       |   10 --
 2 files changed, 50 insertions(+), 68 deletions(-)

diff -r f00811a2736a -r 7a44d751914c linux/drivers/media/video/videobuf-dvb.c
--- a/linux/drivers/media/video/videobuf-dvb.c  Fri Oct 17 00:04:35 2008 +0000
+++ b/linux/drivers/media/video/videobuf-dvb.c  Fri Oct 17 13:02:47 2008 -0300
@@ -138,55 +138,7 @@ static int videobuf_dvb_stop_feed(struct
        return err;
 }
 
-/* ------------------------------------------------------------------ */
-/* Register a single adapter and one or more frontends */
-int videobuf_dvb_register_bus(struct videobuf_dvb_frontends *f,
-                         struct module *module,
-                         void *adapter_priv,
-                         struct device *device,
-                         short *adapter_nr,
-                         int mfe_shared)
-{
-       struct list_head *list, *q;
-       struct videobuf_dvb_frontend *fe;
-       int res;
-
-       fe = videobuf_dvb_get_frontend(f, 1);
-       if (!fe) {
-               printk(KERN_WARNING "Unable to register the adapter which has 
no frontends\n");
-               return -EINVAL;
-       }
-
-       /* Bring up the adapter */
-       res = videobuf_dvb_register_adapter(f, module, adapter_priv, device,
-               fe->dvb.name, adapter_nr, mfe_shared);
-       if (res < 0) {
-               printk(KERN_WARNING "videobuf_dvb_register_adapter failed 
(errno = %d)\n", res);
-               return res;
-       }
-
-       /* Attach all of the frontends to the adapter */
-       mutex_lock(&f->lock);
-       list_for_each_safe(list, q, &f->felist) {
-               fe = list_entry(list, struct videobuf_dvb_frontend, felist);
-               res = videobuf_dvb_register_frontend(&f->adapter, &fe->dvb);
-               if (res < 0) {
-                       printk(KERN_WARNING "%s: videobuf_dvb_register_frontend 
failed (errno = %d)\n",
-                               fe->dvb.name, res);
-                       goto err;
-               }
-       }
-       mutex_unlock(&f->lock);
-       return 0;
-
-err:
-       mutex_unlock(&f->lock);
-       videobuf_dvb_unregister_bus(f);
-       return res;
-}
-EXPORT_SYMBOL(videobuf_dvb_register_bus);
-
-int videobuf_dvb_register_adapter(struct videobuf_dvb_frontends *fe,
+static int videobuf_dvb_register_adapter(struct videobuf_dvb_frontends *fe,
                          struct module *module,
                          void *adapter_priv,
                          struct device *device,
@@ -211,7 +163,7 @@ int videobuf_dvb_register_adapter(struct
        return result;
 }
 
-int videobuf_dvb_register_frontend(struct dvb_adapter *adapter,
+static int videobuf_dvb_register_frontend(struct dvb_adapter *adapter,
        struct videobuf_dvb *dvb)
 {
        int result;
@@ -299,6 +251,54 @@ fail_frontend:
        return result;
 }
 
+/* ------------------------------------------------------------------ */
+/* Register a single adapter and one or more frontends */
+int videobuf_dvb_register_bus(struct videobuf_dvb_frontends *f,
+                         struct module *module,
+                         void *adapter_priv,
+                         struct device *device,
+                         short *adapter_nr,
+                         int mfe_shared)
+{
+       struct list_head *list, *q;
+       struct videobuf_dvb_frontend *fe;
+       int res;
+
+       fe = videobuf_dvb_get_frontend(f, 1);
+       if (!fe) {
+               printk(KERN_WARNING "Unable to register the adapter which has 
no frontends\n");
+               return -EINVAL;
+       }
+
+       /* Bring up the adapter */
+       res = videobuf_dvb_register_adapter(f, module, adapter_priv, device,
+               fe->dvb.name, adapter_nr, mfe_shared);
+       if (res < 0) {
+               printk(KERN_WARNING "videobuf_dvb_register_adapter failed 
(errno = %d)\n", res);
+               return res;
+       }
+
+       /* Attach all of the frontends to the adapter */
+       mutex_lock(&f->lock);
+       list_for_each_safe(list, q, &f->felist) {
+               fe = list_entry(list, struct videobuf_dvb_frontend, felist);
+               res = videobuf_dvb_register_frontend(&f->adapter, &fe->dvb);
+               if (res < 0) {
+                       printk(KERN_WARNING "%s: videobuf_dvb_register_frontend 
failed (errno = %d)\n",
+                               fe->dvb.name, res);
+                       goto err;
+               }
+       }
+       mutex_unlock(&f->lock);
+       return 0;
+
+err:
+       mutex_unlock(&f->lock);
+       videobuf_dvb_unregister_bus(f);
+       return res;
+}
+EXPORT_SYMBOL(videobuf_dvb_register_bus);
+
 void videobuf_dvb_unregister_bus(struct videobuf_dvb_frontends *f)
 {
        struct list_head *list, *q;
@@ -394,11 +394,3 @@ fail_alloc:
        return fe;
 }
 EXPORT_SYMBOL(videobuf_dvb_alloc_frontend);
-
-/* ------------------------------------------------------------------ */
-/*
- * Local variables:
- * c-basic-offset: 8
- * compile-command: "make DVB=1"
- * End:
- */
diff -r f00811a2736a -r 7a44d751914c linux/include/media/videobuf-dvb.h
--- a/linux/include/media/videobuf-dvb.h        Fri Oct 17 00:04:35 2008 +0000
+++ b/linux/include/media/videobuf-dvb.h        Fri Oct 17 13:02:47 2008 -0300
@@ -46,16 +46,6 @@ int videobuf_dvb_register_bus(struct vid
 
 void videobuf_dvb_unregister_bus(struct videobuf_dvb_frontends *f);
 
-int videobuf_dvb_register_adapter(struct videobuf_dvb_frontends *f,
-                         struct module *module,
-                         void *adapter_priv,
-                         struct device *device,
-                         char *adapter_name,
-                         short *adapter_nr,
-                         int mfe_shared);
-
-int videobuf_dvb_register_frontend(struct dvb_adapter *adapter, struct 
videobuf_dvb *dvb);
-
 struct videobuf_dvb_frontend * videobuf_dvb_alloc_frontend(struct 
videobuf_dvb_frontends *f, int id);
 
 struct videobuf_dvb_frontend * videobuf_dvb_get_frontend(struct 
videobuf_dvb_frontends *f, int id);


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/7a44d751914c0997fa0a797d73a10b1594d2bec0

_______________________________________________
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to