On 10/10/05, Manu Abraham <manu@xxxxxxxxxxx> wrote:presumption is not always good, and it is very clear. Most of the flamewars blaze up because of that. Anyway let's not hover on that ..
I have fixed most of the stuff, it is partly working, not ready yet asI'm not so bad, I help people (but not 10 times with the same point),
there are some more things to be added to ..
I have attached what i was working on.
fuck it and forget.
Some points to the new driver:
indentation isn't so good, the code is not readable well (80 chars on
a line mainly).
static irqreturn_t mantis_pci_irq(int irq, void *dev_id, struct pt_regs *regs)you don't need to cast from void *
{
int count = 0, interrupts = 0;
u32 stat = 0, mask = 0, temp;
struct mantis_pci *mantis;
mantis = (struct mantis_pci *) dev_id;
struct mantis_pci *mantis = dev_id; is enough
Well i am using it in mantis_dma.c, pci_alloc/freemantis->pdev = pdev;If you work with this out from pci functions, you should call
pci_get_dev and in exit function pci_dev_put, otherwise you don't need
it at all.
mantis_dma_init and others could be __devinit too, or not? Try to use
it as much as possible.
static struct pci_driver mantis_pci_driver = {here should be = __devexit_p(...),
.name = DRIVER_NAME,
.id_table = mantis_pci_table,
.probe = mantis_pci_probe,
.remove = mantis_pci_remove,
Ah , okay.};
err0:you should change naming of labels such as errfree, where do you do kfree etc.