diff options
author | Michael Hunold <devnull@localhost> | 2003-07-16 09:23:28 +0000 |
---|---|---|
committer | Michael Hunold <devnull@localhost> | 2003-07-16 09:23:28 +0000 |
commit | 8ea93347171a95476e21eaabd9ba31ae74f2d233 (patch) | |
tree | db2eef6796e96c6e43d58edfbf239c1d2acc449d /linux/drivers/media | |
parent | be051559d85703fb591c25c7b3acac1d08f808ae (diff) | |
download | mediapointer-dvb-s2-8ea93347171a95476e21eaabd9ba31ae74f2d233.tar.gz mediapointer-dvb-s2-8ea93347171a95476e21eaabd9ba31ae74f2d233.tar.bz2 |
Fix compilation with 2.5
Diffstat (limited to 'linux/drivers/media')
-rw-r--r-- | linux/drivers/media/dvb/b2c2/Makefile | 2 | ||||
-rw-r--r-- | linux/drivers/media/dvb/b2c2/skystar2.c | 30 |
2 files changed, 21 insertions, 11 deletions
diff --git a/linux/drivers/media/dvb/b2c2/Makefile b/linux/drivers/media/dvb/b2c2/Makefile index 7081890e7..df86d99af 100644 --- a/linux/drivers/media/dvb/b2c2/Makefile +++ b/linux/drivers/media/dvb/b2c2/Makefile @@ -1,3 +1,3 @@ -obj-$(DVB_B2C2_SKYSTAR) += skystar.o +obj-$(CONFIG_DVB_B2C2_SKYSTAR) += skystar2.o EXTRA_CFLAGS = -Idrivers/media/dvb/dvb-core/ diff --git a/linux/drivers/media/dvb/b2c2/skystar2.c b/linux/drivers/media/dvb/b2c2/skystar2.c index 2bc01da37..f2710318e 100644 --- a/linux/drivers/media/dvb/b2c2/skystar2.c +++ b/linux/drivers/media/dvb/b2c2/skystar2.c @@ -751,12 +751,13 @@ static void SLL_detectSramSize(struct adapter *adapter) { SramDetectForFlex2(adapter); } - /* EEPROM (Skystar2 has one "24LC08B" chip on board) */ +/* static int EEPROM_write(struct adapter *adapter, u16 addr, u8 * buf, u16 len) { return FLEXI2C_write(adapter, 0x20000000, 0x50, addr, buf, len); } +*/ static int EEPROM_read(struct adapter *adapter, u16 addr, u8 * buf, u16 len) { @@ -906,6 +907,7 @@ static int EEPROM_getMacAddr(struct adapter *adapter, char type, u8 * mac) } } +/* static char EEPROM_setMacAddr(struct adapter *adapter, char type, u8 * mac) { u8 tmp[8]; @@ -936,6 +938,7 @@ static char EEPROM_setMacAddr(struct adapter *adapter, char type, u8 * mac) return 0; } +*/ /* PID filter */ static void FilterEnableStream1Filter(struct adapter *adapter, u32 op) @@ -1888,7 +1891,7 @@ static void InterruptServiceDMA2(struct adapter *adapter) printk("%s:\n", __FUNCTION__); } -static void isr(int irq, void *dev_id, struct pt_regs *regs) +static irqreturn_t isr(int irq, void *dev_id, struct pt_regs *regs) { struct adapter *tmp = dev_id; @@ -1898,17 +1901,23 @@ static void isr(int irq, void *dev_id, struct pt_regs *regs) spin_lock_irq(&tmp->lock); - while (((value = ReadRegDW(tmp, 0x20C)) & 0x0F) != 0) { + if (0 == ((value = ReadRegDW(tmp, 0x20C)) & 0x0F)) { + spin_unlock_irq(&tmp->lock); + return IRQ_NONE; + } + + while (value != 0) { if ((value & 0x03) != 0) InterruptServiceDMA1(tmp); if ((value & 0x0C) != 0) InterruptServiceDMA2(tmp); + value = ReadRegDW(tmp, 0x20C) & 0x0F; } spin_unlock_irq(&tmp->lock); + return IRQ_HANDLED; } - static void Initdmaqueue(struct adapter *adapter) { dma_addr_t dma_addr; @@ -2007,16 +2016,18 @@ static void FreeAdapterObject(struct adapter *adapter) kfree(adapter); } +static struct pci_driver skystar2_pci_driver; + static int ClaimAdapter(struct adapter *adapter) { struct pci_dev *pdev = adapter->pdev; u16 var; - if (!request_region(pci_resource_start(pdev, 1), pci_resource_len(pdev, 1), pdev->name)) + if (!request_region(pci_resource_start(pdev, 1), pci_resource_len(pdev, 1), skystar2_pci_driver.name)) return -EBUSY; - if (!request_mem_region(pci_resource_start(pdev, 0), pci_resource_len(pdev, 0), pdev->name)) + if (!request_mem_region(pci_resource_start(pdev, 0), pci_resource_len(pdev, 0), skystar2_pci_driver.name)) return -EBUSY; pci_read_config_byte(pdev, PCI_CLASS_REVISION, &adapter->card_revision); @@ -2070,7 +2081,7 @@ static int DriverInitialize(struct pci_dev * pdev) memset(adapter, 0, sizeof(struct adapter)); - pdev->driver_data = adapter; + pci_set_drvdata(pdev,adapter); adapter->pdev = pdev; adapter->irq = pdev->irq; @@ -2370,7 +2381,7 @@ static int skystar2_probe(struct pci_dev *pdev, const struct pci_device_id *ent) if (DriverInitialize(pdev) != 0) return -ENODEV; - dvb_register_adapter(&dvb_adapter, pdev->name); + dvb_register_adapter(&dvb_adapter, skystar2_pci_driver.name); if (dvb_adapter == NULL) { printk("%s: Error registering DVB adapter\n", __FUNCTION__); @@ -2380,7 +2391,7 @@ static int skystar2_probe(struct pci_dev *pdev, const struct pci_device_id *ent) return -ENODEV; } - adapter = (struct adapter *) pdev->driver_data; + adapter = (struct adapter *) pci_get_drvdata(pdev); adapter->dvb_adapter = dvb_adapter; @@ -2491,4 +2502,3 @@ module_exit(skystar2_cleanup); MODULE_DESCRIPTION("Technisat SkyStar2 DVB PCI Driver"); MODULE_LICENSE("GPL"); -EXPORT_NO_SYMBOLS; |