]> git.pld-linux.org Git - packages/kernel.git/commitdiff
- new
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Wed, 8 Oct 2003 20:52:26 +0000 (20:52 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    19_videodev25-2.4.22.diff -> 1.1
    30_bt832-2.4.22.diff -> 1.1
    30_btaudio-2.4.22.diff -> 1.1

19_videodev25-2.4.22.diff [new file with mode: 0644]
30_bt832-2.4.22.diff [new file with mode: 0644]
30_btaudio-2.4.22.diff [new file with mode: 0644]

diff --git a/19_videodev25-2.4.22.diff b/19_videodev25-2.4.22.diff
new file mode 100644 (file)
index 0000000..8d7c51d
--- /dev/null
@@ -0,0 +1,159 @@
+diff -u linux-2.4.22/drivers/media/video/videodev.c linux/drivers/media/video/videodev.c
+--- linux-2.4.22/drivers/media/video/videodev.c        2003-09-08 17:26:56.000000000 +0200
++++ linux/drivers/media/video/videodev.c       2003-09-08 17:28:40.000000000 +0200
+@@ -62,6 +62,20 @@
+ #endif /* CONFIG_PROC_FS && CONFIG_VIDEO_PROC_FS */
++struct video_device *video_device_alloc(void)
++{
++      struct video_device *vfd;
++      vfd = kmalloc(sizeof(*vfd),GFP_KERNEL);
++      if (NULL == vfd)
++              return NULL;
++      memset(vfd,0,sizeof(*vfd));
++      return vfd;
++}
++
++void video_device_release(struct video_device *vfd)
++{
++      kfree(vfd);
++}
+ /*
+  *    Read will do some smarts later on. Buffer pin etc.
+@@ -611,6 +625,8 @@
+ #endif
+       devfs_unregister (vfd->devfs_handle);
++      if (vfd->release)
++              vfd->release(vfd);
+       video_device[vfd->minor]=NULL;
+       MOD_DEC_USE_COUNT;
+       up(&videodev_lock);
+@@ -661,6 +677,8 @@
+ module_init(videodev_init)
+ module_exit(videodev_exit)
++EXPORT_SYMBOL(video_device_alloc);
++EXPORT_SYMBOL(video_device_release);
+ EXPORT_SYMBOL(video_register_device);
+ EXPORT_SYMBOL(video_unregister_device);
+ EXPORT_SYMBOL(video_devdata);
+diff -u linux-2.4.22/include/linux/videodev.h linux/include/linux/videodev.h
+--- linux-2.4.22/include/linux/videodev.h      2003-09-08 17:27:56.000000000 +0200
++++ linux/include/linux/videodev.h     2003-09-08 17:28:40.000000000 +0200
+@@ -4,32 +4,25 @@
+ #include <linux/types.h>
+ #include <linux/version.h>
+-#if 0
+-/*
+- * v4l2 is still work-in-progress, integration planed for 2.5.x
+- *   v4l2 project homepage:   http://www.thedirks.org/v4l2/
+- *   patches available from:  http://bytesex.org/patches/
+- */ 
+-# define HAVE_V4L2 1
+-# include <linux/videodev2.h>
+-#else
+-# undef HAVE_V4L2
+-#endif
+-
+ #ifdef __KERNEL__
+ #include <linux/poll.h>
++#include <linux/mm.h>
+ #include <linux/devfs_fs_kernel.h>
+ struct video_device
+ {
+-      struct module *owner;
+-      char name[32];
+-      int type;       /* v4l1 */
+-      int type2;      /* v4l2 */
++      /* device info */
++      char name[32];
++      int type;       /* v4l1 */
++      int type2;      /* v4l2 */
+       int hardware;
+       int minor;
++      /* device ops + callbacks */
++      struct file_operations *fops;
++      void (*release)(struct video_device *vfd);
++
+       /* old, obsolete interface -- dropped in 2.5.x, don't use it */
+       int (*open)(struct video_device *, int mode);
+       void (*close)(struct video_device *);
+@@ -40,28 +33,50 @@
+       int (*mmap)(struct video_device *, const char *, unsigned long);
+       int (*initialize)(struct video_device *);       
+-      /* new interface -- we will use file_operations directly
+-       * like soundcore does. */
+-      struct file_operations *fops;
+-      void *priv;             /* Used to be 'private' but that upsets C++ */
+-
+-      /* for videodev.c intenal usage -- don't touch */
+-      int users;
+-      struct semaphore lock;
+-      devfs_handle_t devfs_handle;
++#if 1 /* to be removed in 2.7.x */
++      /* obsolete -- fops->owner is used instead */
++      struct module *owner;
++      /* dev->driver_data will be used instead some day.
++       * Use the video_{get|set}_drvdata() helper functions,
++       * so the switch over will be transparent for you.
++       * Or use {pci|usb}_{get|set}_drvdata() directly. */
++      void *priv;
++#endif
++
++      /* for videodev.c intenal usage -- please don't touch */
++      int users;                     /* video_exclusive_{open|close} ... */
++      struct semaphore lock;         /* ... helper function uses these   */
++      devfs_handle_t devfs_handle;   /* devfs */
+ };
+ #define VIDEO_MAJOR   81
+-extern int video_register_device(struct video_device *, int type, int nr);
+ #define VFL_TYPE_GRABBER      0
+ #define VFL_TYPE_VBI          1
+ #define VFL_TYPE_RADIO                2
+ #define VFL_TYPE_VTX          3
++extern int video_register_device(struct video_device *, int type, int nr);
+ extern void video_unregister_device(struct video_device *);
+ extern struct video_device* video_devdata(struct file*);
++
++/* helper functions to alloc / release struct video_device, the
++   later can be used for video_device->release() */
++struct video_device *video_device_alloc(void);
++void video_device_release(struct video_device *vfd);
++
++/* helper functions to access driver private data. */
++static inline void *video_get_drvdata(struct video_device *dev)
++{
++      return dev->priv;
++}
++
++static inline void video_set_drvdata(struct video_device *dev, void *data)
++{
++      dev->priv = data;
++}
++
+ extern int video_exclusive_open(struct inode *inode, struct file *file);
+ extern int video_exclusive_release(struct inode *inode, struct file *file);
+ extern int video_usercopy(struct inode *inode, struct file *file,
+@@ -403,9 +418,8 @@
+ #define VID_HARDWARE_PWC      31      /* Philips webcams */
+ #define VID_HARDWARE_MEYE     32      /* Sony Vaio MotionEye cameras */
+ #define VID_HARDWARE_CPIA2    33
+-#define VID_HARDWARE_VICAM    34      /* ViCam, 3Com Homeconnect */
++#define VID_HARDWARE_VICAM      34
+ #define VID_HARDWARE_SF16FMR2 35
+-
+ #endif /* __LINUX_VIDEODEV_H */
+ /*
diff --git a/30_bt832-2.4.22.diff b/30_bt832-2.4.22.diff
new file mode 100644 (file)
index 0000000..10a74a9
--- /dev/null
@@ -0,0 +1,115 @@
+diff -u linux-2.4.22/drivers/media/video/bt832.c linux/drivers/media/video/bt832.c
+--- linux-2.4.22/drivers/media/video/bt832.c   2003-09-08 17:26:56.000000000 +0200
++++ linux/drivers/media/video/bt832.c  2003-09-08 17:30:22.000000000 +0200
+@@ -1,5 +1,5 @@
+ /* Driver for Bt832 CMOS Camera Video Processor
+-    i2c-adresses: 0x88 or 0x8a
++    i2c-addresses: 0x88 or 0x8a
+   The BT832 interfaces to a Quartzsight Digital Camera (352x288, 25 or 30 fps)
+   via a 9 pin connector ( 4-wire SDATA, 2-wire i2c, SCLK, VCC, GND).
+@@ -31,8 +31,9 @@
+ #include <linux/errno.h>
+ #include <linux/slab.h>
+-#include "id.h"
+ #include "audiochip.h"
++#include "id.h"
++#include "i2c-compat.h"
+ #include "bttv.h"
+ #include "bt832.h"
+@@ -184,7 +185,7 @@
+                 return -ENOMEM;
+       memset(t,0,sizeof(*t));
+       t->client = client_template;
+-        t->client.data = t;
++        i2c_set_clientdata(&t->client, t);
+         i2c_attach_client(&t->client);
+       MOD_INC_USE_COUNT;
+@@ -198,30 +199,19 @@
+ static int bt832_probe(struct i2c_adapter *adap)
+ {
+-      int rc;
+-
+-      printk("bt832_probe\n");
+-
+-      switch (adap->id) {
+-      case I2C_ALGO_BIT | I2C_HW_B_BT848:
+-      case I2C_ALGO_BIT | I2C_HW_B_RIVA:
+-      case I2C_ALGO_SAA7134:
+-              printk("bt832: probing %s i2c adapter [id=0x%x]\n",
+-                     adap->name,adap->id);
+-              rc = i2c_probe(adap, &addr_data, bt832_attach);
+-              break;
+-      default:
+-              printk("bt832: ignoring %s i2c adapter [id=0x%x]\n",
+-                     adap->name,adap->id);
+-              rc = 0;
+-              /* nothing */
+-      }
+-      return rc;
++#ifdef I2C_ADAP_CLASS_TV_ANALOG
++      if (adap->class & I2C_ADAP_CLASS_TV_ANALOG)
++              return i2c_probe(adap, &addr_data, bt832_attach);
++#else
++      if (adap->id == (I2C_ALGO_BIT | I2C_HW_B_BT848))
++              return i2c_probe(adap, &addr_data, bt832_attach);
++#endif
++      return 0;
+ }
+ static int bt832_detach(struct i2c_client *client)
+ {
+-      struct bt832 *t = (struct bt832*)client->data;
++      struct bt832 *t = i2c_get_clientdata(client);
+       printk("bt832: detach.\n");
+       i2c_detach_client(client);
+@@ -233,7 +223,7 @@
+ static int
+ bt832_command(struct i2c_client *client, unsigned int cmd, void *arg)
+ {
+-      struct bt832 *t = (struct bt832*)client->data;
++      struct bt832 *t = i2c_get_clientdata(client);
+       printk("bt832: command %x\n",cmd);
+@@ -266,9 +256,9 @@
+ };
+ static struct i2c_client client_template =
+ {
+-        .name   = "bt832",
+-      .flags  = I2C_CLIENT_ALLOW_USE,
+-        .driver = &driver,
++      I2C_DEVNAME("bt832"),
++      .flags      = I2C_CLIENT_ALLOW_USE,
++        .driver     = &driver,
+ };
+@@ -286,3 +276,10 @@
+ module_init(bt832_init_module);
+ module_exit(bt832_cleanup_module);
++/*
++ * Overrides for Emacs so that we follow Linus's tabbing style.
++ * ---------------------------------------------------------------------------
++ * Local variables:
++ * c-basic-offset: 8
++ * End:
++ */
+diff -u linux-2.4.22/drivers/media/video/bt832.h linux/drivers/media/video/bt832.h
+--- linux-2.4.22/drivers/media/video/bt832.h   2003-09-08 17:27:12.000000000 +0200
++++ linux/drivers/media/video/bt832.h  2003-09-08 17:30:22.000000000 +0200
+@@ -4,7 +4,7 @@
+   color digital camera directly to video capture devices via an 8-bit,
+   4:2:2 YUV or YCrCb video interface.
+- i2c adresses: 0x88 or 0x8a
++ i2c addresses: 0x88 or 0x8a
+  */
+ /* The 64 registers: */
diff --git a/30_btaudio-2.4.22.diff b/30_btaudio-2.4.22.diff
new file mode 100644 (file)
index 0000000..c81a295
--- /dev/null
@@ -0,0 +1,428 @@
+diff -u linux-2.4.22/drivers/sound/btaudio.c linux/drivers/sound/btaudio.c
+--- linux-2.4.22/drivers/sound/btaudio.c       2003-09-08 17:26:58.000000000 +0200
++++ linux/drivers/sound/btaudio.c      2003-09-08 17:30:22.000000000 +0200
+@@ -1,7 +1,7 @@
+ /*
+-    btaudio - bt878 audio dma driver for linux 2.4.x
++    btaudio - bt878 audio dma driver for linux 2.4 / 2.5
+-    (c) 2000-2002 Gerd Knorr <kraxel@bytesex.org>
++    (c) 2000-2003 Gerd Knorr <kraxel@bytesex.org>
+     This program is free software; you can redistribute it and/or modify
+     it under the terms of the GNU General Public License as published by
+@@ -19,14 +19,12 @@
+ */
+-#include <linux/version.h>
+ #include <linux/module.h>
+ #include <linux/errno.h>
+ #include <linux/pci.h>
+ #include <linux/sched.h>
+ #include <linux/signal.h>
+ #include <linux/types.h>
+-#include <linux/wrapper.h>
+ #include <linux/interrupt.h>
+ #include <linux/init.h>
+ #include <linux/poll.h>
+@@ -37,6 +35,9 @@
+ #include <asm/uaccess.h>
+ #include <asm/io.h>
++# define irqreturn_t void
++# define IRQ_RETVAL(foobar)
++# define strlcpy(dest,src,len) strncpy(dest,src,(len)-1)
+ /* mmio access */
+ #define btwrite(dat,adr)    writel((dat), (bta->mmio+(adr)))
+@@ -152,15 +153,30 @@
+       int rate;
+ };
+-static struct btaudio *btaudios = NULL;
+-static unsigned int debug = 0;
+-static unsigned int irq_debug = 0;
++static struct btaudio *btaudios  = NULL;
++static unsigned int btcount      = 0;
++static unsigned int debug        = 0;
++static unsigned int irq_debug    = 0;
+ /* -------------------------------------------------------------- */
+ #define BUF_DEFAULT 128*1024
+ #define BUF_MIN         8192
++static void free_buffer(struct btaudio *bta)
++{
++      if (NULL != bta->buf_cpu) {
++              pci_free_consistent(bta->pci, bta->buf_size,
++                                  bta->buf_cpu, bta->buf_dma);
++              bta->buf_cpu = NULL;
++      }
++      if (NULL != bta->risc_cpu) {
++              pci_free_consistent(bta->pci, bta->risc_size,
++                                  bta->risc_cpu, bta->risc_dma);
++              bta->risc_cpu = NULL;
++      }
++}
++
+ static int alloc_buffer(struct btaudio *bta)
+ {
+       if (NULL == bta->buf_cpu) {
+@@ -172,7 +188,7 @@
+                               break;
+               }
+               if (NULL == bta->buf_cpu)
+-                      return -ENOMEM;
++                      goto err;
+               memset(bta->buf_cpu,0,bta->buf_size);
+       }
+       if (NULL == bta->risc_cpu) {
+@@ -180,23 +196,13 @@
+               bta->risc_cpu = pci_alloc_consistent
+                       (bta->pci, bta->risc_size, &bta->risc_dma);
+               if (NULL == bta->risc_cpu)
+-                      return -ENOMEM;
++                      goto err;
+       }
+       return 0;
+-}
+-static void free_buffer(struct btaudio *bta)
+-{
+-      if (NULL != bta->buf_cpu) {
+-              pci_free_consistent(bta->pci, bta->buf_size,
+-                                  bta->buf_cpu, bta->buf_dma);
+-              bta->buf_cpu = NULL;
+-      }
+-      if (NULL != bta->risc_cpu) {
+-              pci_free_consistent(bta->pci, bta->risc_size,
+-                                  bta->risc_cpu, bta->risc_dma);
+-              bta->risc_cpu = NULL;
+-      }
++ err:
++      free_buffer(bta);
++      return -ENOMEM;
+ }
+ static int make_risc(struct btaudio *bta)
+@@ -330,8 +336,8 @@
+       if (cmd == SOUND_MIXER_INFO) {
+               mixer_info info;
+               memset(&info,0,sizeof(info));
+-                strncpy(info.id,"bt878",sizeof(info.id)-1);
+-                strncpy(info.name,"Brooktree Bt878 audio",sizeof(info.name)-1);
++                strlcpy(info.id,"bt878",sizeof(info.id));
++                strlcpy(info.name,"Brooktree Bt878 audio",sizeof(info.name));
+                 info.modify_counter = bta->mixcount;
+                 if (copy_to_user((void *)arg, &info, sizeof(info)))
+                         return -EFAULT;
+@@ -340,8 +346,8 @@
+       if (cmd == SOUND_OLD_MIXER_INFO) {
+               _old_mixer_info info;
+               memset(&info,0,sizeof(info));
+-                strncpy(info.id,"bt878",sizeof(info.id)-1);
+-                strncpy(info.name,"Brooktree Bt878 audio",sizeof(info.name)-1);
++                strlcpy(info.id,"bt878",sizeof(info.id));
++                strlcpy(info.name,"Brooktree Bt878 audio",sizeof(info.name));
+                 if (copy_to_user((void *)arg, &info, sizeof(info)))
+                         return -EFAULT;
+               return 0;
+@@ -426,11 +432,11 @@
+ }
+ static struct file_operations btaudio_mixer_fops = {
+-      owner:   THIS_MODULE,
+-      llseek:  no_llseek,
+-      open:    btaudio_mixer_open,
+-      release: btaudio_mixer_release,
+-      ioctl:   btaudio_mixer_ioctl,
++      .owner    = THIS_MODULE,
++      .llseek   = no_llseek,
++      .open     = btaudio_mixer_open,
++      .release  = btaudio_mixer_release,
++      .ioctl    = btaudio_mixer_ioctl,
+ };
+ /* -------------------------------------------------------------- */
+@@ -791,25 +797,25 @@
+ }
+ static struct file_operations btaudio_digital_dsp_fops = {
+-      owner:   THIS_MODULE,
+-      llseek:  no_llseek,
+-      open:    btaudio_dsp_open_digital,
+-      release: btaudio_dsp_release,
+-      read:    btaudio_dsp_read,
+-      write:   btaudio_dsp_write,
+-      ioctl:   btaudio_dsp_ioctl,
+-      poll:    btaudio_dsp_poll,
++      .owner   = THIS_MODULE,
++      .llseek  = no_llseek,
++      .open    = btaudio_dsp_open_digital,
++      .release = btaudio_dsp_release,
++      .read    = btaudio_dsp_read,
++      .write   = btaudio_dsp_write,
++      .ioctl   = btaudio_dsp_ioctl,
++      .poll    = btaudio_dsp_poll,
+ };
+ static struct file_operations btaudio_analog_dsp_fops = {
+-      owner:   THIS_MODULE,
+-      llseek:  no_llseek,
+-      open:    btaudio_dsp_open_analog,
+-      release: btaudio_dsp_release,
+-      read:    btaudio_dsp_read,
+-      write:   btaudio_dsp_write,
+-      ioctl:   btaudio_dsp_ioctl,
+-      poll:    btaudio_dsp_poll,
++      .owner   = THIS_MODULE,
++      .llseek  = no_llseek,
++      .open    = btaudio_dsp_open_analog,
++      .release = btaudio_dsp_release,
++      .read    = btaudio_dsp_read,
++      .write   = btaudio_dsp_write,
++      .ioctl   = btaudio_dsp_ioctl,
++      .poll    = btaudio_dsp_poll,
+ };
+ /* -------------------------------------------------------------- */
+@@ -818,18 +824,20 @@
+                           "RISCI", "FBUS", "FTRGT", "FDSR", "PPERR",
+                           "RIPERR", "PABORT", "OCERR", "SCERR" };
+-static void btaudio_irq(int irq, void *dev_id, struct pt_regs * regs)
++static irqreturn_t btaudio_irq(int irq, void *dev_id, struct pt_regs * regs)
+ {
+       int count = 0;
+       u32 stat,astat;
+       struct btaudio *bta = dev_id;
++      int handled = 0;
+       for (;;) {
+               count++;
+               stat  = btread(REG_INT_STAT);
+               astat = stat & btread(REG_INT_MASK);
+               if (!astat)
+-                      return;
++                      break;
++              handled = 1;
+               btwrite(astat,REG_INT_STAT);
+               if (irq_debug) {
+@@ -865,29 +873,31 @@
+                       btwrite(0, REG_INT_MASK);
+               }
+       }
+-      return;
++      return IRQ_RETVAL(handled);
+ }
+ /* -------------------------------------------------------------- */
+-static unsigned int dsp1 = -1;
+-static unsigned int dsp2 = -1;
+-static unsigned int mixer = -1;
++#define BTAUDIO_MAX 16
++
++static unsigned int dsp1[BTAUDIO_MAX]  = { [ 0 ... BTAUDIO_MAX-1 ] = -1 };
++static unsigned int dsp2[BTAUDIO_MAX]  = { [ 0 ... BTAUDIO_MAX-1 ] = -1 };
++static unsigned int mixer[BTAUDIO_MAX] = { [ 0 ... BTAUDIO_MAX-1 ] = -1 };
++static int digital[BTAUDIO_MAX] = { [ 0 ... BTAUDIO_MAX-1 ] = 1 };
++static int analog[BTAUDIO_MAX]  = { [ 0 ... BTAUDIO_MAX-1 ] = 1 };
++static int rate[BTAUDIO_MAX]    = { [ 0 ... BTAUDIO_MAX-1 ] = 0 };
+ static int latency = -1;
+-static int digital = 1;
+-static int analog = 1;
+-static int rate = 0;
+ #define BTA_OSPREY200 1
+ static struct cardinfo cards[] = {
+       [0] = {
+-              name: "default",
+-              rate: 32000,
++              .name = "default",
++              .rate = 32000,
+       },
+       [BTA_OSPREY200] = {
+-              name: "Osprey 200",
+-              rate: 44100,
++              .name = "Osprey 200",
++              .rate = 44100,
+       },
+ };
+@@ -899,6 +909,9 @@
+       unsigned char revision,lat;
+       int rc = -EBUSY;
++      if (BTAUDIO_MAX == btcount)
++              return -EBUSY;
++
+       if (pci_enable_device(pci_dev))
+               return -EIO;
+       if (!request_mem_region(pci_resource_start(pci_dev,0),
+@@ -932,8 +945,8 @@
+       /* sample rate */
+       bta->rate = card->rate;
+-      if (rate)
+-              bta->rate = rate;
++      if (rate[btcount])
++              bta->rate = rate[btcount];
+       
+       init_MUTEX(&bta->lock);
+         init_waitqueue_head(&bta->readq);
+@@ -955,7 +968,7 @@
+       /* init hw */
+         btwrite(0, REG_GPIO_DMA_CTL);
+         btwrite(0, REG_INT_MASK);
+-        btwrite(~0x0UL, REG_INT_STAT);
++        btwrite(~(u32)0, REG_INT_STAT);
+       pci_set_master(pci_dev);
+       if ((rc = request_irq(bta->irq, btaudio_irq, SA_SHIRQ|SA_INTERRUPT,
+@@ -966,9 +979,9 @@
+       }
+       /* register devices */
+-      if (digital) {
++      if (digital[btcount]) {
+               rc = bta->dsp_digital =
+-                      register_sound_dsp(&btaudio_digital_dsp_fops,dsp1);
++                      register_sound_dsp(&btaudio_digital_dsp_fops,dsp1[btcount]);
+               if (rc < 0) {
+                       printk(KERN_WARNING
+                              "btaudio: can't register digital dsp (rc=%d)\n",rc);
+@@ -977,9 +990,9 @@
+               printk(KERN_INFO "btaudio: registered device dsp%d [digital]\n",
+                      bta->dsp_digital >> 4);
+       }
+-      if (analog) {
++      if (analog[btcount]) {
+               rc = bta->dsp_analog =
+-                      register_sound_dsp(&btaudio_analog_dsp_fops,dsp2);
++                      register_sound_dsp(&btaudio_analog_dsp_fops,dsp2[btcount]);
+               if (rc < 0) {
+                       printk(KERN_WARNING
+                              "btaudio: can't register analog dsp (rc=%d)\n",rc);
+@@ -987,7 +1000,8 @@
+               }
+               printk(KERN_INFO "btaudio: registered device dsp%d [analog]\n",
+                      bta->dsp_analog >> 4);
+-              rc = bta->mixer_dev = register_sound_mixer(&btaudio_mixer_fops,mixer);
++              rc = bta->mixer_dev = register_sound_mixer(&btaudio_mixer_fops,
++                                                         mixer[btcount]);
+               if (rc < 0) {
+                       printk(KERN_WARNING
+                              "btaudio: can't register mixer (rc=%d)\n",rc);
+@@ -1000,6 +1014,7 @@
+       /* hook into linked list */
+       bta->next = btaudios;
+       btaudios = bta;
++      btcount++;
+       pci_set_drvdata(pci_dev,bta);
+         return 0;
+@@ -1027,7 +1042,7 @@
+       /* turn off all DMA / IRQs */
+         btand(~15, REG_GPIO_DMA_CTL);
+         btwrite(0, REG_INT_MASK);
+-        btwrite(~0x0UL, REG_INT_STAT);
++        btwrite(~(u32)0, REG_INT_STAT);
+       /* unregister devices */
+       if (digital) {
+@@ -1052,6 +1067,7 @@
+                       ; /* if (NULL == walk->next) BUG(); */
+               walk->next = bta->next;
+       }
++      btcount--;
+       pci_set_drvdata(pci_dev, NULL);
+       kfree(bta);
+@@ -1060,33 +1076,33 @@
+ /* -------------------------------------------------------------- */
+-static struct pci_device_id btaudio_pci_tbl[] __devinitdata = {
++static struct pci_device_id btaudio_pci_tbl[] = {
+         {
+-              vendor:       PCI_VENDOR_ID_BROOKTREE,
+-              device:       0x0878,
+-              subvendor:    0x0070,
+-              subdevice:    0xff01,
+-              driver_data:  BTA_OSPREY200,
++              .vendor       = PCI_VENDOR_ID_BROOKTREE,
++              .device       = 0x0878,
++              .subvendor    = 0x0070,
++              .subdevice    = 0xff01,
++              .driver_data  = BTA_OSPREY200,
+       },{
+-              vendor:       PCI_VENDOR_ID_BROOKTREE,
+-              device:       0x0878,
+-              subvendor:    PCI_ANY_ID,
+-              subdevice:    PCI_ANY_ID,
++              .vendor       = PCI_VENDOR_ID_BROOKTREE,
++              .device       = 0x0878,
++              .subvendor    = PCI_ANY_ID,
++              .subdevice    = PCI_ANY_ID,
+       },{
+-              vendor:       PCI_VENDOR_ID_BROOKTREE,
+-              device:       0x0878,
+-              subvendor:    PCI_ANY_ID,
+-              subdevice:    PCI_ANY_ID,
++              .vendor       = PCI_VENDOR_ID_BROOKTREE,
++              .device       = 0x0879,
++              .subvendor    = PCI_ANY_ID,
++              .subdevice    = PCI_ANY_ID,
+         },{
+               /* --- end of list --- */
+       }
+ };
+ static struct pci_driver btaudio_pci_driver = {
+-        name:     "btaudio",
+-        id_table: btaudio_pci_tbl,
+-        probe:    btaudio_probe,
+-        remove:   __devexit_p(btaudio_remove),
++        .name     = "btaudio",
++        .id_table = btaudio_pci_tbl,
++        .probe    = btaudio_probe,
++        .remove   = __devexit_p(btaudio_remove),
+ };
+ static int btaudio_init_module(void)
+@@ -1107,15 +1123,21 @@
+ module_init(btaudio_init_module);
+ module_exit(btaudio_cleanup_module);
+-MODULE_PARM(dsp1,"i");
+-MODULE_PARM(dsp2,"i");
+-MODULE_PARM(mixer,"i");
+-MODULE_PARM(debug,"i");
+-MODULE_PARM(irq_debug,"i");
+-MODULE_PARM(digital,"i");
+-MODULE_PARM(analog,"i");
+-MODULE_PARM(rate,"i");
+-MODULE_PARM(latency,"i");
++MODULE_PARM(dsp1, "1-" __stringify(BTAUDIO_MAX) "i");
++MODULE_PARM_DESC(dsp1,"digital dsp nr");
++MODULE_PARM(dsp2, "1-" __stringify(BTAUDIO_MAX) "i");
++MODULE_PARM_DESC(dsp2,"analog dsp nr");
++MODULE_PARM(mixer, "1-" __stringify(BTAUDIO_MAX) "i");
++MODULE_PARM_DESC(mixer,"mixer nr");
++MODULE_PARM(debug, "i");
++MODULE_PARM(irq_debug, "i");
++MODULE_PARM(digital, "1-" __stringify(BTAUDIO_MAX) "i");
++MODULE_PARM_DESC(digital,"register digital dsp device");
++MODULE_PARM(analog, "1-" __stringify(BTAUDIO_MAX) "i");
++MODULE_PARM_DESC(analog,"register analog dsp device (and mixer)");
++MODULE_PARM(rate, "1-" __stringify(BTAUDIO_MAX) "i");
++MODULE_PARM_DESC(rate,"sample rate supported by the hardware");
++MODULE_PARM(latency, "i");
+ MODULE_PARM_DESC(latency,"pci latency timer");
+ MODULE_DEVICE_TABLE(pci, btaudio_pci_tbl);
This page took 0.09431 seconds and 4 git commands to generate.