Commit fb4532b5 authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://ldm.bkbits.net/linux-2.5-core

into penguin.transmeta.com:/home/penguin/torvalds/repositories/kernel/linux
parents bb8d2379 21846253
......@@ -190,15 +190,10 @@ apply_relocate_add(Elf64_Shdr *sechdrs, const char *strtab,
/* This is where to make the change. */
location = base + rela[i].r_offset;
/* This is the symbol it is referring to. */
/* This is the symbol it is referring to. Note that all
unresolved symbols have been resolved. */
sym = symtab + r_sym;
value = sym->st_value;
if (!value) {
printk(KERN_ERR "module %s: Unknown symbol %s\n",
me->name, strtab + sym->st_name);
return -ENOENT;
}
value += rela[i].r_addend;
value = sym->st_value + rela[i].r_addend;
switch (r_type) {
case R_ALPHA_NONE:
......
......@@ -98,11 +98,6 @@ apply_relocate(Elf32_Shdr *sechdrs, const char *strtab, unsigned int symindex,
}
sym = ((Elf32_Sym *)symsec->sh_addr) + offset;
if (!sym->st_value) {
printk(KERN_WARNING "%s: unknown symbol %s\n",
module->name, strtab + sym->st_name);
return -ENOENT;
}
if (rel->r_offset < 0 || rel->r_offset > dstsec->sh_size - sizeof(u32)) {
printk(KERN_ERR "%s: out of bounds relocation, "
......
......@@ -70,14 +70,10 @@ int apply_relocate(Elf32_Shdr *sechdrs,
/* This is where to make the change */
location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr
+ rel[i].r_offset;
/* This is the symbol it is referring to */
/* This is the symbol it is referring to. Note that all
undefined symbols have been resolved. */
sym = (Elf32_Sym *)sechdrs[symindex].sh_addr
+ ELF32_R_SYM(rel[i].r_info);
if (!sym->st_value) {
printk(KERN_WARNING "%s: Unknown symbol %s\n",
me->name, strtab + sym->st_name);
return -ENOENT;
}
switch (ELF32_R_TYPE(rel[i].r_info)) {
case R_386_32:
......
......@@ -197,14 +197,10 @@ int apply_relocate_add(Elf32_Shdr *sechdrs,
/* This is where to make the change */
location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr
+ rela[i].r_offset;
/* This is the symbol it is referring to */
/* This is the symbol it is referring to. Note that all
undefined symbols have been resolved. */
sym = (Elf32_Sym *)sechdrs[symindex].sh_addr
+ ELF32_R_SYM(rela[i].r_info);
if (!sym->st_value) {
printk(KERN_WARNING "%s: Unknown symbol %s\n",
module->name, strtab + sym->st_name);
return -ENOENT;
}
/* `Everything is relative'. */
value = sym->st_value + rela[i].r_addend;
......
/*
* arch/s390x/kernel/module.c - Kernel module help for s390x.
* arch/s390/kernel/module.c - Kernel module help for s390.
*
* S390 version
* Copyright (C) 2002 IBM Deutschland Entwicklung GmbH, IBM Corporation
......@@ -77,14 +77,10 @@ int apply_relocate(Elf_Shdr *sechdrs,
/* This is where to make the change */
location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr
+ rel[i].r_offset;
/* This is the symbol it is referring to */
/* This is the symbol it is referring to. Note that all
undefined symbols have been resolved. */
sym = (ElfW(Sym) *)sechdrs[symindex].sh_addr
+ ELFW(R_SYM)(rel[i].r_info);
if (!sym->st_value) {
printk(KERN_WARNING "%s: Unknown symbol %s\n",
me->name, strtab + sym->st_name);
return -ENOENT;
}
switch (ELF_R_TYPE(rel[i].r_info)) {
case R_390_8: /* Direct 8 bit. */
......
......@@ -78,14 +78,10 @@ int apply_relocate(Elf_Shdr *sechdrs,
/* This is where to make the change */
location = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr
+ rel[i].r_offset;
/* This is the symbol it is referring to */
/* This is the symbol it is referring to. Note that all
undefined symbols have been resolved. */
sym = (ElfW(Sym) *)sechdrs[symindex].sh_addr
+ ELFW(R_SYM)(rel[i].r_info);
if (!sym->st_value) {
printk(KERN_WARNING "%s: Unknown symbol %s\n",
me->name, strtab + sym->st_name);
return -ENOENT;
}
switch (ELF_R_TYPE(rel[i].r_info)) {
case R_390_8: /* Direct 8 bit. */
......
......@@ -75,15 +75,11 @@ int apply_relocate_add(Elf32_Shdr *sechdrs,
location = (u8 *)sechdrs[sechdrs[relsec].sh_info].sh_addr
+ rel[i].r_offset;
loc32 = (u32 *) location;
/* This is the symbol it is referring to */
/* This is the symbol it is referring to. Note that all
undefined symbols have been resolved. */
sym = (Elf32_Sym *)sechdrs[symindex].sh_addr
+ ELF32_R_SYM(rel[i].r_info);
if (!(v = sym->st_value)) {
printk(KERN_WARNING "%s: Unknown symbol %s\n",
me->name, strtab + sym->st_name);
return -ENOENT;
}
v += rel[i].r_addend;
v = sym->st_value + rel[i].r_addend;
switch (ELF32_R_TYPE(rel[i].r_info)) {
case R_SPARC_32:
......
......@@ -185,15 +185,11 @@ int apply_relocate_add(Elf64_Shdr *sechdrs,
BUG_ON(((u64)location >> (u64)32) != (u64)0);
/* This is the symbol it is referring to */
/* This is the symbol it is referring to. Note that all
undefined symbols have been resolved. */
sym = (Elf64_Sym *)sechdrs[symindex].sh_addr
+ ELF64_R_SYM(rel[i].r_info);
if (!(v = sym->st_value)) {
printk(KERN_WARNING "%s: Unknown symbol %s\n",
me->name, strtab + sym->st_name);
return -ENOENT;
}
v += rel[i].r_addend;
v = sym->st_value + rel[i].r_addend;
switch (ELF64_R_TYPE(rel[i].r_info) & 0xff) {
case R_SPARC_64:
......
......@@ -184,19 +184,12 @@ int apply_relocate_add (Elf32_Shdr *sechdrs, const char *strtab,
uint32_t *loc
= ((void *)sechdrs[sechdrs[relsec].sh_info].sh_addr
+ rela[i].r_offset);
/* This is the symbol it is referring to */
/* This is the symbol it is referring to. Note that all
undefined symbols have been resolved. */
Elf32_Sym *sym
= ((Elf32_Sym *)sechdrs[symindex].sh_addr
+ ELF32_R_SYM (rela[i].r_info));
uint32_t val = sym->st_value;
if (! val) {
printk (KERN_WARNING "%s: Unknown symbol %s\n",
mod->name, strtab + sym->st_name);
return -ENOENT;
}
val += rela[i].r_addend;
uint32_t val = sym->st_value + rela[i].r_addend;
switch (ELF32_R_TYPE (rela[i].r_info)) {
case R_V850_32:
......
......@@ -53,14 +53,10 @@ int apply_relocate_add(Elf64_Shdr *sechdrs,
loc = (void *)sechdrs[sechdrs[relsec].sh_info].sh_addr
+ rel[i].r_offset;
/* This is the symbol it is referring to */
/* This is the symbol it is referring to. Note that all
undefined symbols have been resolved. */
sym = (Elf64_Sym *)sechdrs[symindex].sh_addr
+ ELF64_R_SYM(rel[i].r_info);
if (!sym->st_value) {
printk(KERN_WARNING "%s: Unknown symbol %s\n",
me->name, strtab + sym->st_name);
return -ENOENT;
}
DEBUGP("type %d st_value %Lx r_addend %Lx loc %Lx\n",
(int)ELF64_R_TYPE(rel[i].r_info),
......
......@@ -63,7 +63,7 @@ static struct pnp_card_id fcpnp_ids[] __devinitdata = {
.driver_data = (unsigned long) "Fritz!Card PnP",
.devs = { { "AVM0900" } } }
};
//MODULE_DEVICE_TABLE(pnpc, fcpnp_ids); FIXME
MODULE_DEVICE_TABLE(pnp_card, fcpnp_ids);
static int protocol = 2; /* EURO-ISDN Default */
MODULE_PARM(protocol, "i");
......@@ -911,7 +911,7 @@ static struct pci_driver fcpci_driver = {
#ifdef __ISAPNP__
static int __devinit fcpnp_probe(struct pnp_card *card,
const struct pnp_card_id *card_id)
const struct pnp_card_device_id *card_id)
{
struct fritz_adapter *adapter;
struct pnp_dev *pnp_dev;
......
......@@ -455,10 +455,7 @@ static void awc_pnp_release(void) {
if (awc_proc_unset_fun)
awc_proc_unset_fun(i);
if (isapnp_cfg_begin(logdev->PNP_BUS->PNP_BUS_NUMBER, logdev->PNP_DEV_NUMBER)<0)
printk("isapnp cfg failed at release \n");
isapnp_deactivate(logdev->PNP_DEV_NUMBER);
isapnp_cfg_end();
pnp_device_detach(logdev);
release_region(aironet4500_devices[i]->base_addr, AIRONET4X00_IO_SIZE);
// release_region(isa_cisaddr, AIRONET4X00_CIS_SIZE, "aironet4x00 cis");
......
......@@ -206,13 +206,14 @@ static int __init ne_probe_isapnp(struct net_device *dev)
if (pnp_device_attach(idev) < 0)
continue;
if (pnp_activate_dev(idev, NULL) < 0) {
__again:
pnp_device_detach(idev);
continue;
}
/* if no io and irq, search for next */
if (!pnp_port_valid(idev, 0) || !pnp_irq_valid(idev, 0))
goto __again;
if (!pnp_port_valid(idev, 0) || !pnp_irq_valid(idev, 0)) {
pnp_device_detach(idev);
continue;
}
/* found it */
dev->base_addr = pnp_port_start(idev, 0);
dev->irq = pnp_irq(idev, 0);
......@@ -786,9 +787,9 @@ void cleanup_module(void)
struct net_device *dev = &dev_ne[this_dev];
if (dev->priv != NULL) {
void *priv = dev->priv;
struct pci_dev *idev = (struct pci_dev *)ei_status.priv;
struct pnp_dev *idev = (struct pnp_dev *)ei_status.priv;
if (idev)
idev->deactivate(idev);
pnp_device_detach(idev);
free_irq(dev->irq, dev);
release_region(dev->base_addr, NE_IO_EXTENT);
unregister_netdev(dev);
......
......@@ -550,9 +550,9 @@ cleanup_module(void)
int ioaddr = dev->base_addr - ULTRA_NIC_OFFSET;
#ifdef __ISAPNP__
struct pci_dev *idev = (struct pci_dev *)ei_status.priv;
struct pnp_dev *idev = (struct pnp_dev *)ei_status.priv;
if (idev)
idev->deactivate(idev);
pnp_device_detach(idev);
#endif
unregister_netdev(dev);
......
......@@ -22,9 +22,9 @@
LIST_HEAD(pnp_cards);
static const struct pnp_card_id * match_card(struct pnpc_driver *drv, struct pnp_card *card)
static const struct pnp_card_device_id * match_card(struct pnpc_driver *drv, struct pnp_card *card)
{
const struct pnp_card_id *drv_id = drv->id_table;
const struct pnp_card_device_id *drv_id = drv->id_table;
while (*drv_id->id){
if (compare_pnp_id(card->id,drv_id->id))
return drv_id;
......@@ -216,19 +216,16 @@ struct pnp_dev * pnp_request_card_device(struct pnp_card *card, const char *id,
return NULL;
found:
spin_lock(&pnp_lock);
if(dev->status != PNP_READY){
spin_unlock(&pnp_lock);
if (pnp_device_attach(dev) < 0)
return NULL;
}
dev->status = PNP_ATTACHED;
spin_unlock(&pnp_lock);
cdrv = to_pnpc_driver(card->dev.driver);
if (dev->active == 0) {
if (!(cdrv->flags & PNPC_DRIVER_DO_NOT_ACTIVATE)) {
if(pnp_activate_dev(dev,NULL)<0)
if(pnp_activate_dev(dev,NULL)<0) {
pnp_device_detach(dev);
return NULL;
}
}
} else {
if ((cdrv->flags & PNPC_DRIVER_DO_NOT_ACTIVATE))
pnp_disable_dev(dev);
......@@ -250,10 +247,8 @@ void pnp_release_card_device(struct pnp_dev *dev)
{
spin_lock(&pnp_lock);
list_del(&dev->rdev_list);
if (dev->status == PNP_ATTACHED)
dev->status = PNP_READY;
spin_unlock(&pnp_lock);
pnp_disable_dev(dev);
pnp_device_detach(dev);
}
static void pnpc_recover_devices(struct pnp_card *card)
......@@ -291,7 +286,7 @@ static int pnpc_card_probe(struct device *dev)
int error = 0;
struct pnpc_driver *drv = to_pnpc_driver(dev->driver);
struct pnp_card *card = to_pnp_card(dev);
const struct pnp_card_id *card_id = NULL;
const struct pnp_card_device_id *card_id = NULL;
pnp_dbg("pnp: match found with the PnP card '%s' and the driver '%s'", dev->bus_id,drv->name);
......
......@@ -102,7 +102,6 @@ static int isapnp_detected;
/* some prototypes */
static int isapnp_config_prepare(struct pnp_dev *dev);
extern struct pnp_protocol isapnp_card_protocol;
extern struct pnp_protocol isapnp_protocol;
static inline void write_data(unsigned char x)
......@@ -1125,7 +1124,7 @@ int __init isapnp_init(void)
isapnp_build_device_list();
cards = 0;
protocol_for_each_card(&isapnp_card_protocol,card) {
protocol_for_each_card(&isapnp_protocol,card) {
cards++;
if (isapnp_verbose) {
printk(KERN_INFO "isapnp: Card '%s'\n", card->name[0]?card->name:"Unknown");
......
......@@ -156,11 +156,12 @@ typedef __s64 Elf64_Sxword;
#define STT_SECTION 3
#define STT_FILE 4
#define ELF32_ST_BIND(x) ((x) >> 4)
#define ELF32_ST_TYPE(x) (((unsigned int) x) & 0xf)
#define ELF64_ST_BIND(x) ((x) >> 4)
#define ELF64_ST_TYPE(x) (((unsigned int) x) & 0xf)
#define ELF_ST_BIND(x) ((x) >> 4)
#define ELF_ST_TYPE(x) (((unsigned int) x) & 0xf)
#define ELF32_ST_BIND(x) ELF_ST_BIND(x)
#define ELF32_ST_TYPE(x) ELF_ST_TYPE(x)
#define ELF64_ST_BIND(x) ELF_ST_BIND(x)
#define ELF64_ST_TYPE(x) ELF_ST_TYPE(x)
/* Symbolic values for the entries in the auxiliary table
put on the initial stack */
......
......@@ -5,14 +5,6 @@
#include <linux/module.h>
#include <linux/elf.h>
/* Helper function for arch-specific module loaders */
unsigned long find_symbol_internal(Elf_Shdr *sechdrs,
unsigned int symindex,
const char *strtab,
const char *name,
struct module *mod,
struct kernel_symbol_group **group);
/* These must be implemented by the specific architecture */
/* Adjust arch-specific sections. Return 0 on success. */
......
......@@ -189,7 +189,7 @@ struct pnp_device_id {
unsigned long driver_data; /* data private to the driver */
};
struct pnp_card_id {
struct pnp_card_device_id {
char id[7];
unsigned long driver_data; /* data private to the driver */
struct {
......@@ -216,9 +216,9 @@ struct pnp_driver {
struct pnpc_driver {
struct list_head node;
char *name;
const struct pnp_card_id *id_table;
const struct pnp_card_device_id *id_table;
unsigned int flags;
int (*probe) (struct pnp_card *card, const struct pnp_card_id *card_id);
int (*probe) (struct pnp_card *card, const struct pnp_card_device_id *card_id);
void (*remove) (struct pnp_card *card);
struct device_driver driver;
};
......
......@@ -722,28 +722,22 @@ static int obsolete_params(const char *name,
}
#endif /* CONFIG_OBSOLETE_MODPARM */
/* Find an symbol for this module (ie. resolve internals first).
It we find one, record usage. Must be holding module_mutex. */
unsigned long find_symbol_internal(Elf_Shdr *sechdrs,
/* Resolve a symbol for this module. I.e. if we find one, record usage.
Must be holding module_mutex. */
static unsigned long resolve_symbol(Elf_Shdr *sechdrs,
unsigned int symindex,
const char *strtab,
const char *name,
struct module *mod,
struct kernel_symbol_group **ksg)
struct module *mod)
{
struct kernel_symbol_group *ksg;
unsigned long ret;
ret = find_local_symbol(sechdrs, symindex, strtab, name);
if (ret) {
*ksg = NULL;
return ret;
}
/* Look in other modules... */
spin_lock_irq(&modlist_lock);
ret = __find_symbol(name, ksg, mod->license_gplok);
ret = __find_symbol(name, &ksg, mod->license_gplok);
if (ret) {
/* This can fail due to OOM, or module unloading */
if (!use_module(mod, (*ksg)->owner))
if (!use_module(mod, ksg->owner))
ret = 0;
}
spin_unlock_irq(&modlist_lock);
......@@ -832,21 +826,19 @@ static int simplify_symbols(Elf_Shdr *sechdrs,
unsigned int strindex,
struct module *mod)
{
unsigned int i;
Elf_Sym *sym;
/* First simplify defined symbols, so if they become the
"answer" to undefined symbols, copying their st_value us
correct. */
for (sym = (void *)sechdrs[symindex].sh_addr, i = 0;
i < sechdrs[symindex].sh_size / sizeof(Elf_Sym);
i++) {
Elf_Sym *sym = (void *)sechdrs[symindex].sh_addr;
const char *strtab = (char *)sechdrs[strindex].sh_addr;
unsigned int i, n = sechdrs[symindex].sh_size / sizeof(Elf_Sym);
int ret = 0;
for (i = 1; i < n; i++) {
switch (sym[i].st_shndx) {
case SHN_COMMON:
/* We compiled with -fno-common. These are not
supposed to happen. */
DEBUGP("Common symbol: %s\n", strtab + sym[i].st_name);
return -ENOEXEC;
ret = -ENOEXEC;
break;
case SHN_ABS:
/* Don't need to do anything */
......@@ -855,6 +847,20 @@ static int simplify_symbols(Elf_Shdr *sechdrs,
break;
case SHN_UNDEF:
sym[i].st_value
= resolve_symbol(sechdrs, symindex, strtab,
strtab + sym[i].st_name, mod);
/* Ok if resolved. */
if (sym[i].st_value != 0)
break;
/* Ok if weak. */
if (ELF_ST_BIND(sym[i].st_info) == STB_WEAK)
break;
printk(KERN_WARNING "%s: Unknown symbol %s\n",
mod->name, strtab + sym[i].st_name);
ret = -ENOENT;
break;
default:
......@@ -862,30 +868,11 @@ static int simplify_symbols(Elf_Shdr *sechdrs,
= (unsigned long)
(sechdrs[sym[i].st_shndx].sh_addr
+ sym[i].st_value);
break;
}
}
/* Now try to resolve undefined symbols */
for (sym = (void *)sechdrs[symindex].sh_addr, i = 0;
i < sechdrs[symindex].sh_size / sizeof(Elf_Sym);
i++) {
if (sym[i].st_shndx == SHN_UNDEF) {
/* Look for symbol */
struct kernel_symbol_group *ksg = NULL;
const char *strtab
= (char *)sechdrs[strindex].sh_addr;
sym[i].st_value
= find_symbol_internal(sechdrs,
symindex,
strtab,
strtab + sym[i].st_name,
mod,
&ksg);
}
}
return 0;
return ret;
}
/* Update size with this section: return offset. */
......
......@@ -2983,14 +2983,14 @@ static struct pnp_dev *activate_dev(char *devname, char *resname, struct pnp_dev
{
int err;
/* Device already active? Let's use it */
if(dev->active)
return(dev);
err = pnp_device_attach(dev);
if (err < 0)
return(NULL);
if((err = pnp_activate_dev(dev,NULL)) < 0) {
printk(KERN_ERR "ad1848: %s %s config failed (out of resources?)[%d]\n", devname, resname, err);
pnp_disable_dev(dev);
pnp_device_detach(dev);
return(NULL);
}
......@@ -3006,12 +3006,11 @@ static struct pnp_dev *ad1848_init_generic(struct pnp_card *bus, struct address_
{
if((ad1848_dev = activate_dev(ad1848_isapnp_list[slot].name, "ad1848", ad1848_dev)))
{
get_device(&ad1848_dev->dev);
hw_config->io_base = ad1848_dev->resource[ad1848_isapnp_list[slot].mss_io].start;
hw_config->irq = ad1848_dev->irq_resource[ad1848_isapnp_list[slot].irq].start;
hw_config->dma = ad1848_dev->dma_resource[ad1848_isapnp_list[slot].dma].start;
hw_config->io_base = pnp_port_start(ad1848_dev, ad1848_isapnp_list[slot].mss_io);
hw_config->irq = pnp_irq(ad1848_dev, ad1848_isapnp_list[slot].irq);
hw_config->dma = pnp_dma(ad1848_dev, ad1848_isapnp_list[slot].dma);
if(ad1848_isapnp_list[slot].dma2 != -1)
hw_config->dma2 = ad1848_dev->dma_resource[ad1848_isapnp_list[slot].dma2].start;
hw_config->dma2 = pnp_dma(ad1848_dev, ad1848_isapnp_list[slot].dma2);
else
hw_config->dma2 = -1;
hw_config->card_subtype = ad1848_isapnp_list[slot].type;
......@@ -3032,7 +3031,7 @@ static int __init ad1848_isapnp_init(struct address_info *hw_config, struct pnp_
if(ad1848_init_generic(bus, hw_config, slot)) {
/* We got it. */
printk(KERN_NOTICE "ad1848: ISAPnP reports '%s' at i/o %#x, irq %d, dma %d, %d\n",
printk(KERN_NOTICE "ad1848: PnP reports '%s' at i/o %#x, irq %d, dma %d, %d\n",
busname,
hw_config->io_base, hw_config->irq, hw_config->dma,
hw_config->dma2);
......@@ -3122,8 +3121,7 @@ static void __exit cleanup_ad1848(void)
#ifdef CONFIG_PNP
if(ad1848_dev){
if(audio_activated)
pnp_disable_dev(ad1848_dev);
put_device(&ad1848_dev->dev);
pnp_device_detach(ad1848_dev);
}
#endif
}
......
......@@ -357,7 +357,7 @@ MODULE_PARM_DESC(isapnp,"Enable ISAPnP probing (default 1)");
/* All cs4232 based cards have the main ad1848 card either as CSC0000 or
* CSC0100. */
static const struct pnp_id cs4232_pnp_table[] = {
static const struct pnp_device_id cs4232_pnp_table[] = {
{ .id = "CSC0100", .driver_data = 0 },
{ .id = "CSC0000", .driver_data = 0 },
/* Guillemot Turtlebeach something appears to be cs4232 compatible
......@@ -366,9 +366,9 @@ static const struct pnp_id cs4232_pnp_table[] = {
{ .id = ""}
};
/*MODULE_DEVICE_TABLE(isapnp, isapnp_cs4232_list);*/
MODULE_DEVICE_TABLE(pnp, cs4232_pnp_table);
static int cs4232_pnp_probe(struct pnp_dev *dev, const struct pnp_id *card_id, const struct pnp_id *dev_id)
static int cs4232_pnp_probe(struct pnp_dev *dev, const struct pnp_device_id *dev_id)
{
struct address_info *isapnpcfg;
......@@ -376,30 +376,31 @@ static int cs4232_pnp_probe(struct pnp_dev *dev, const struct pnp_id *card_id, c
if (!isapnpcfg)
return -ENOMEM;
isapnpcfg->irq = dev->irq_resource[0].start;
isapnpcfg->dma = dev->dma_resource[0].start;
isapnpcfg->dma2 = dev->dma_resource[1].start;
isapnpcfg->io_base = dev->resource[0].start;
isapnpcfg->irq = pnp_irq(dev, 0);
isapnpcfg->dma = pnp_dma(dev, 0);
isapnpcfg->dma2 = pnp_dma(dev, 1);
isapnpcfg->io_base = pnp_port_start(dev, 0);
if (probe_cs4232(isapnpcfg,TRUE) == 0) {
printk(KERN_ERR "cs4232: ISA PnP card found, but not detected?\n");
kfree(isapnpcfg);
return -ENODEV;
}
attach_cs4232(isapnpcfg);
pci_set_drvdata(dev,isapnpcfg);
pnp_set_drvdata(dev,isapnpcfg);
return 0;
}
static void cs4232_pnp_remove(struct pnp_dev *dev)
{
struct address_info *cfg = (struct address_info*) dev->driver_data;
if (cfg)
struct address_info *cfg = pnp_get_drvdata(dev);
if (cfg) {
unload_cs4232(cfg);
kfree(cfg);
}
}
static struct pnp_driver cs4232_driver = {
.name = "cs4232",
.card_id_table = NULL,
.id_table = cs4232_pnp_table,
.probe = cs4232_pnp_probe,
.remove = cs4232_pnp_remove,
......
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