minor patch from Jon Smirl : sets up some things for later use
parent
9277f9eef3
commit
ecf1458b2c
|
@ -728,6 +728,7 @@ extern int DRM(lock)(struct inode *inode, struct file *filp,
|
||||||
extern int DRM(unlock)(struct inode *inode, struct file *filp,
|
extern int DRM(unlock)(struct inode *inode, struct file *filp,
|
||||||
unsigned int cmd, unsigned long arg);
|
unsigned int cmd, unsigned long arg);
|
||||||
extern int DRM(fb_loaded);
|
extern int DRM(fb_loaded);
|
||||||
|
extern struct file_operations DRM(fops);
|
||||||
|
|
||||||
/* Device support (drm_fops.h) */
|
/* Device support (drm_fops.h) */
|
||||||
extern int DRM(open_helper)(struct inode *inode, struct file *filp,
|
extern int DRM(open_helper)(struct inode *inode, struct file *filp,
|
||||||
|
|
|
@ -103,10 +103,10 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef DRIVER_PREINIT
|
#ifndef DRIVER_PREINIT
|
||||||
#define DRIVER_PREINIT(dev) 0
|
#define DRIVER_PREINIT(dev, flags) 0
|
||||||
#endif
|
#endif
|
||||||
#ifndef DRIVER_POSTINIT
|
#ifndef DRIVER_POSTINIT
|
||||||
#define DRIVER_POSTINIT(dev) 0
|
#define DRIVER_POSTINIT(dev, flags) 0
|
||||||
#endif
|
#endif
|
||||||
#ifndef DRIVER_PRERELEASE
|
#ifndef DRIVER_PRERELEASE
|
||||||
#define DRIVER_PRERELEASE()
|
#define DRIVER_PRERELEASE()
|
||||||
|
@ -115,7 +115,7 @@
|
||||||
#define DRIVER_PRETAKEDOWN(dev)
|
#define DRIVER_PRETAKEDOWN(dev)
|
||||||
#endif
|
#endif
|
||||||
#ifndef DRIVER_POSTCLEANUP
|
#ifndef DRIVER_POSTCLEANUP
|
||||||
#define DRIVER_POSTCLEANUP()
|
#define DRIVER_POSTCLEANUP(dev)
|
||||||
#endif
|
#endif
|
||||||
#ifndef DRIVER_PRESETUP
|
#ifndef DRIVER_PRESETUP
|
||||||
#define DRIVER_PRESETUP()
|
#define DRIVER_PRESETUP()
|
||||||
|
@ -131,7 +131,7 @@
|
||||||
#endif
|
#endif
|
||||||
#ifndef DRIVER_FOPS
|
#ifndef DRIVER_FOPS
|
||||||
#define DRIVER_FOPS \
|
#define DRIVER_FOPS \
|
||||||
static struct file_operations DRM(fops) = { \
|
struct file_operations DRM(fops) = { \
|
||||||
.owner = THIS_MODULE, \
|
.owner = THIS_MODULE, \
|
||||||
.open = DRM(open), \
|
.open = DRM(open), \
|
||||||
.flush = DRM(flush), \
|
.flush = DRM(flush), \
|
||||||
|
@ -596,7 +596,7 @@ static int drm_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||||
dev->pci_func = PCI_FUNC(pdev->devfn);
|
dev->pci_func = PCI_FUNC(pdev->devfn);
|
||||||
dev->irq = pdev->irq;
|
dev->irq = pdev->irq;
|
||||||
|
|
||||||
if ((retcode = DRIVER_PREINIT(dev)))
|
if ((retcode = DRIVER_PREINIT(dev, ent->driver_data)))
|
||||||
goto error_out_unreg;
|
goto error_out_unreg;
|
||||||
|
|
||||||
#if __REALLY_HAVE_AGP
|
#if __REALLY_HAVE_AGP
|
||||||
|
@ -643,8 +643,8 @@ static int drm_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||||
dev->minor,
|
dev->minor,
|
||||||
pci_pretty_name(pdev)
|
pci_pretty_name(pdev)
|
||||||
);
|
);
|
||||||
|
/* drivers add secondary heads here if needed */
|
||||||
if ((retcode = DRIVER_POSTINIT(dev)))
|
if ((retcode = DRIVER_POSTINIT(dev, ent->driver_data)))
|
||||||
goto error_out_unreg;
|
goto error_out_unreg;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -765,6 +765,7 @@ static void __exit drm_cleanup( drm_device_t *dev )
|
||||||
dev->agp = NULL;
|
dev->agp = NULL;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
DRIVER_POSTCLEANUP(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __exit drm_exit (void)
|
static void __exit drm_exit (void)
|
||||||
|
|
|
@ -139,7 +139,6 @@ static int drm_hotplug (struct class_device *dev, char **envp, int num_envp,
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
envp[i] = 0;
|
envp[i] = 0;
|
||||||
DRM_DEBUG(" - ok\n");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -728,6 +728,7 @@ extern int DRM(lock)(struct inode *inode, struct file *filp,
|
||||||
extern int DRM(unlock)(struct inode *inode, struct file *filp,
|
extern int DRM(unlock)(struct inode *inode, struct file *filp,
|
||||||
unsigned int cmd, unsigned long arg);
|
unsigned int cmd, unsigned long arg);
|
||||||
extern int DRM(fb_loaded);
|
extern int DRM(fb_loaded);
|
||||||
|
extern struct file_operations DRM(fops);
|
||||||
|
|
||||||
/* Device support (drm_fops.h) */
|
/* Device support (drm_fops.h) */
|
||||||
extern int DRM(open_helper)(struct inode *inode, struct file *filp,
|
extern int DRM(open_helper)(struct inode *inode, struct file *filp,
|
||||||
|
|
|
@ -103,10 +103,10 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef DRIVER_PREINIT
|
#ifndef DRIVER_PREINIT
|
||||||
#define DRIVER_PREINIT(dev) 0
|
#define DRIVER_PREINIT(dev, flags) 0
|
||||||
#endif
|
#endif
|
||||||
#ifndef DRIVER_POSTINIT
|
#ifndef DRIVER_POSTINIT
|
||||||
#define DRIVER_POSTINIT(dev) 0
|
#define DRIVER_POSTINIT(dev, flags) 0
|
||||||
#endif
|
#endif
|
||||||
#ifndef DRIVER_PRERELEASE
|
#ifndef DRIVER_PRERELEASE
|
||||||
#define DRIVER_PRERELEASE()
|
#define DRIVER_PRERELEASE()
|
||||||
|
@ -115,7 +115,7 @@
|
||||||
#define DRIVER_PRETAKEDOWN(dev)
|
#define DRIVER_PRETAKEDOWN(dev)
|
||||||
#endif
|
#endif
|
||||||
#ifndef DRIVER_POSTCLEANUP
|
#ifndef DRIVER_POSTCLEANUP
|
||||||
#define DRIVER_POSTCLEANUP()
|
#define DRIVER_POSTCLEANUP(dev)
|
||||||
#endif
|
#endif
|
||||||
#ifndef DRIVER_PRESETUP
|
#ifndef DRIVER_PRESETUP
|
||||||
#define DRIVER_PRESETUP()
|
#define DRIVER_PRESETUP()
|
||||||
|
@ -131,7 +131,7 @@
|
||||||
#endif
|
#endif
|
||||||
#ifndef DRIVER_FOPS
|
#ifndef DRIVER_FOPS
|
||||||
#define DRIVER_FOPS \
|
#define DRIVER_FOPS \
|
||||||
static struct file_operations DRM(fops) = { \
|
struct file_operations DRM(fops) = { \
|
||||||
.owner = THIS_MODULE, \
|
.owner = THIS_MODULE, \
|
||||||
.open = DRM(open), \
|
.open = DRM(open), \
|
||||||
.flush = DRM(flush), \
|
.flush = DRM(flush), \
|
||||||
|
@ -596,7 +596,7 @@ static int drm_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||||
dev->pci_func = PCI_FUNC(pdev->devfn);
|
dev->pci_func = PCI_FUNC(pdev->devfn);
|
||||||
dev->irq = pdev->irq;
|
dev->irq = pdev->irq;
|
||||||
|
|
||||||
if ((retcode = DRIVER_PREINIT(dev)))
|
if ((retcode = DRIVER_PREINIT(dev, ent->driver_data)))
|
||||||
goto error_out_unreg;
|
goto error_out_unreg;
|
||||||
|
|
||||||
#if __REALLY_HAVE_AGP
|
#if __REALLY_HAVE_AGP
|
||||||
|
@ -643,8 +643,8 @@ static int drm_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||||
dev->minor,
|
dev->minor,
|
||||||
pci_pretty_name(pdev)
|
pci_pretty_name(pdev)
|
||||||
);
|
);
|
||||||
|
/* drivers add secondary heads here if needed */
|
||||||
if ((retcode = DRIVER_POSTINIT(dev)))
|
if ((retcode = DRIVER_POSTINIT(dev, ent->driver_data)))
|
||||||
goto error_out_unreg;
|
goto error_out_unreg;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -765,6 +765,7 @@ static void __exit drm_cleanup( drm_device_t *dev )
|
||||||
dev->agp = NULL;
|
dev->agp = NULL;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
DRIVER_POSTCLEANUP(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __exit drm_exit (void)
|
static void __exit drm_exit (void)
|
||||||
|
|
|
@ -139,7 +139,6 @@ static int drm_hotplug (struct class_device *dev, char **envp, int num_envp,
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
envp[i] = 0;
|
envp[i] = 0;
|
||||||
DRM_DEBUG(" - ok\n");
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue