Commit 79d00d1d authored by Kai Germaschewski's avatar Kai Germaschewski

ISDN: Update eicon driver for removal of pcibios_*

Fairly obviously, but untested.
parent 6caf77e6
...@@ -103,8 +103,7 @@ typedef struct ...@@ -103,8 +103,7 @@ typedef struct
int card_id; /* unique id assigned to this card */ int card_id; /* unique id assigned to this card */
int card_type; /* use DIA_CARD_TYPE_xxx above */ int card_type; /* use DIA_CARD_TYPE_xxx above */
int bus_type; /* use DIA_BUS_TYPE_xxx above */ int bus_type; /* use DIA_BUS_TYPE_xxx above */
int bus_num; /* bus number (instance number of bus type) */ struct pci_dev *pdev;
int func_num; /* adapter function number (PCI register) */
int slot; /* slot number in bus */ int slot; /* slot number in bus */
unsigned char irq; /* IRQ number */ unsigned char irq; /* IRQ number */
int reset_base; /* Reset register for I/O mapped cards */ int reset_base; /* Reset register for I/O mapped cards */
......
This diff is collapsed.
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include <linux/config.h> #include <linux/config.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/interrupt.h>
#include <linux/smp_lock.h> #include <linux/smp_lock.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/system.h> #include <asm/system.h>
...@@ -67,8 +68,7 @@ int UxCardHandleGet(ux_diva_card_t **card, dia_card_t *cfg) ...@@ -67,8 +68,7 @@ int UxCardHandleGet(ux_diva_card_t **card, dia_card_t *cfg)
switch (cfg->bus_type) switch (cfg->bus_type)
{ {
case DIA_BUS_TYPE_PCI: case DIA_BUS_TYPE_PCI:
c->bus_num = cfg->bus_num; c->pdev = cfg->pdev;
c->func_num = cfg->func_num;
c->io_base = cfg->io_base; c->io_base = cfg->io_base;
c->reset_base = cfg->reset_base; c->reset_base = cfg->reset_base;
c->card_type = cfg->card_type; c->card_type = cfg->card_type;
...@@ -625,16 +625,15 @@ void UxIsrRemove(ux_diva_card_t *card, void *dev_id) ...@@ -625,16 +625,15 @@ void UxIsrRemove(ux_diva_card_t *card, void *dev_id)
void UxPciConfigWrite(ux_diva_card_t *card, int size, int offset, void *value) void UxPciConfigWrite(ux_diva_card_t *card, int size, int offset, void *value)
{ {
switch (size) switch (size) {
{
case sizeof(byte): case sizeof(byte):
pcibios_write_config_byte(card->bus_num, card->func_num, offset, * (byte *) value); pci_write_config_byte(card->pdev, offset, * (byte *) value);
break; break;
case sizeof(word): case sizeof(word):
pcibios_write_config_word(card->bus_num, card->func_num, offset, * (word *) value); pci_write_config_word(card->pdev, offset, * (word *) value);
break; break;
case sizeof(dword): case sizeof(dword):
pcibios_write_config_dword(card->bus_num, card->func_num, offset, * (dword *) value); pci_write_config_dword(card->pdev, offset, * (dword *) value);
break; break;
default: default:
printk(KERN_WARNING "Divas: Invalid size in UxPciConfigWrite\n"); printk(KERN_WARNING "Divas: Invalid size in UxPciConfigWrite\n");
...@@ -643,16 +642,15 @@ void UxPciConfigWrite(ux_diva_card_t *card, int size, int offset, void *value) ...@@ -643,16 +642,15 @@ void UxPciConfigWrite(ux_diva_card_t *card, int size, int offset, void *value)
void UxPciConfigRead(ux_diva_card_t *card, int size, int offset, void *value) void UxPciConfigRead(ux_diva_card_t *card, int size, int offset, void *value)
{ {
switch (size) switch (size) {
{
case sizeof(byte): case sizeof(byte):
pcibios_read_config_byte(card->bus_num, card->func_num, offset, (byte *) value); pci_read_config_byte(card->pdev, offset, (byte *) value);
break; break;
case sizeof(word): case sizeof(word):
pcibios_read_config_word(card->bus_num, card->func_num, offset, (word *) value); pci_read_config_word(card->pdev, offset, (word *) value);
break; break;
case sizeof(dword): case sizeof(dword):
pcibios_read_config_dword(card->bus_num, card->func_num, offset, (unsigned int *) value); pci_read_config_dword(card->pdev, offset, (unsigned int *) value);
break; break;
default: default:
printk(KERN_WARNING "Divas: Invalid size in UxPciConfigRead\n"); printk(KERN_WARNING "Divas: Invalid size in UxPciConfigRead\n");
......
...@@ -28,8 +28,7 @@ struct ux_diva_card_s ...@@ -28,8 +28,7 @@ struct ux_diva_card_s
int reset_base; int reset_base;
int card_type; int card_type;
byte *mapped; byte *mapped;
int bus_num; struct pci_dev *pdev;
int func_num;
int slot; int slot;
int irq; int irq;
byte *pDRAM; byte *pDRAM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment