[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20061002210718.GI3003@slug>
Date: Mon, 2 Oct 2006 21:07:18 +0000
From: Frederik Deweerdt <deweerdt@...e.fr>
To: Matthew Wilcox <matthew@....cx>
Cc: Arjan van de Ven <arjan@...radead.org>, linux-scsi@...r.kernel.org,
"Linux-Kernel," <linux-kernel@...r.kernel.org>,
"J.A. Magall??n" <jamagallon@....com>,
Alan Cox <alan@...rguk.ukuu.org.uk>,
Andrew Morton <akpm@...l.org>, Jeff Garzik <jeff@...zik.org>
Subject: Re: [RFC PATCH] move drm to pci_request_irq
On Mon, Oct 02, 2006 at 12:37:49PM -0600, Matthew Wilcox wrote:
> On Mon, Oct 02, 2006 at 08:12:29PM +0000, Frederik Deweerdt wrote:
> >
> > + pci_set_drvdata(dev, NULL);
> > +
> > DRM_DEBUG("lastclose completed\n");
>
> Not necessary. pci_devs are allocated initialised to 0.
Actually, this is the exit path, I felt like it could be safer if it was
set to NULL before freeing it.
>
> > @@ -132,8 +132,10 @@ static int drm_irq_install(drm_device_t
> > if (drm_core_check_feature(dev, DRIVER_IRQ_SHARED))
> > sh_flags = IRQF_SHARED;
> >
> > - ret = request_irq(dev->irq, dev->driver->irq_handler,
> > - sh_flags, dev->devname, dev);
> > + pci_set_drvdata(dev->pdev, dev);
> > +
> > + ret = pci_request_irq(dev->pdev, dev->driver->irq_handler,
> > + sh_flags, dev->devname);
>
> This seems like the wrong place to be setting the pci_drvdata. It
> should probably be done in each driver. But then, requesting the IRQ
> should also be done by each driver. You've dragged us into the "wow,
> what a mess DRI is" black hole here, I'm afraid.
I must admit that I had no idea where to initialize it. Do you have a
better place in mind?
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists