diff options
author | Matt Turner <mattst88@gmail.com> | 2010-08-03 00:15:18 -0400 |
---|---|---|
committer | Matt Turner <mattst88@gmail.com> | 2011-01-25 13:27:08 -0500 |
commit | 59b126951bff4a6972da1c52b1ba7d3e85f82603 (patch) | |
tree | b0315a14817d53148eaae5dce4e742c75b970ed6 | |
parent | e8f9b1903633557bf889041c326a04d928f96570 (diff) | |
download | glint-59b126951bff4a6972da1c52b1ba7d3e85f82603.tar.gz |
drm/glint: add pci probe and remove functions, set DRIVER_MODESET
Signed-off-by: Matt Turner <mattst88@gmail.com>
-rw-r--r-- | drivers/gpu/drm/glint/glint_drv.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/drivers/gpu/drm/glint/glint_drv.c b/drivers/gpu/drm/glint/glint_drv.c index 8f8b94b31f725c..24f78a920ff78a 100644 --- a/drivers/gpu/drm/glint/glint_drv.c +++ b/drivers/gpu/drm/glint/glint_drv.c @@ -6,12 +6,28 @@ #include "drm_pciids.h" +static struct drm_driver driver; + static struct pci_device_id pciidlist[] = { glint_PCI_IDS }; +static int __devinit +glint_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) +{ + return drm_get_dev(pdev, ent, &driver); +} + +static void +glint_pci_remove(struct pci_dev *pdev) +{ + struct drm_device *dev = pci_get_drvdata(pdev); + + drm_put_dev(dev); +} + static struct drm_driver driver = { - .driver_features = 0, + .driver_features = DRIVER_MODESET, .load = glint_driver_load, .unload = glint_driver_unload, .irq_preinstall = glint_driver_irq_preinstall, @@ -34,6 +50,8 @@ static struct drm_driver driver = { .pci_driver = { .name = DRIVER_NAME, .id_table = pciidlist, + .probe = glint_pci_probe, + .remove = glint_pci_remove, }, .name = DRIVER_NAME, |