diff options
author | vehemens <vehemens@verizon.net> | 2009-03-08 18:17:15 -0700 |
---|---|---|
committer | Robert Noland <rnoland@2hip.net> | 2009-03-08 22:18:43 -0500 |
commit | 2221e16703bf5bf813a98926b968bd5b28eb5d70 (patch) | |
tree | e3ceae93efbfb3d77b534ca88d636c833d6c4ff7 | |
parent | 391c92ae1799f0d1fddb2321c5713afc58575514 (diff) |
FreeBSD use kdev for kernel device name
Signed-off-by: Robert Noland <rnoland@2hip.net>
-rw-r--r-- | bsd-core/drmP.h | 6 | ||||
-rw-r--r-- | bsd-core/drm_drv.c | 36 | ||||
-rw-r--r-- | bsd-core/i915_drv.c | 28 | ||||
-rw-r--r-- | bsd-core/mach64_drv.c | 16 | ||||
-rw-r--r-- | bsd-core/mga_drv.c | 16 | ||||
-rw-r--r-- | bsd-core/r128_drv.c | 16 | ||||
-rw-r--r-- | bsd-core/radeon_drv.c | 16 | ||||
-rw-r--r-- | bsd-core/savage_drv.c | 16 | ||||
-rw-r--r-- | bsd-core/sis_drv.c | 16 | ||||
-rw-r--r-- | bsd-core/tdfx_drv.c | 16 | ||||
-rw-r--r-- | bsd-core/via_drv.c | 16 |
11 files changed, 99 insertions, 99 deletions
diff --git a/bsd-core/drmP.h b/bsd-core/drmP.h index 43910278..b1ae993c 100644 --- a/bsd-core/drmP.h +++ b/bsd-core/drmP.h @@ -717,10 +717,10 @@ static inline int drm_core_has_AGP(struct drm_device *dev) extern int drm_debug_flag; /* Device setup support (drm_drv.c) */ -int drm_probe(device_t nbdev, drm_pci_id_list_t *idlist); -int drm_attach(device_t nbdev, drm_pci_id_list_t *idlist); +int drm_probe(device_t kdev, drm_pci_id_list_t *idlist); +int drm_attach(device_t kdev, drm_pci_id_list_t *idlist); void drm_close(void *data); -int drm_detach(device_t nbdev); +int drm_detach(device_t kdev); d_ioctl_t drm_ioctl; d_open_t drm_open; d_read_t drm_read; diff --git a/bsd-core/drm_drv.c b/bsd-core/drm_drv.c index 85e86d36..2be461da 100644 --- a/bsd-core/drm_drv.c +++ b/bsd-core/drm_drv.c @@ -155,53 +155,53 @@ static int drm_msi_is_blacklisted(int vendor, int device) return 0; } -int drm_probe(device_t dev, drm_pci_id_list_t *idlist) +int drm_probe(device_t kdev, drm_pci_id_list_t *idlist) { drm_pci_id_list_t *id_entry; int vendor, device; #if __FreeBSD_version < 700010 device_t realdev; - if (!strcmp(device_get_name(dev), "drmsub")) - realdev = device_get_parent(dev); + if (!strcmp(device_get_name(kdev), "drmsub")) + realdev = device_get_parent(kdev); else - realdev = dev; + realdev = kdev; vendor = pci_get_vendor(realdev); device = pci_get_device(realdev); #else - vendor = pci_get_vendor(dev); - device = pci_get_device(dev); + vendor = pci_get_vendor(kdev); + device = pci_get_device(kdev); #endif - if (pci_get_class(dev) != PCIC_DISPLAY - || pci_get_subclass(dev) != PCIS_DISPLAY_VGA) + if (pci_get_class(kdev) != PCIC_DISPLAY + || pci_get_subclass(kdev) != PCIS_DISPLAY_VGA) return ENXIO; id_entry = drm_find_description(vendor, device, idlist); if (id_entry != NULL) { - device_set_desc(dev, id_entry->name); + device_set_desc(kdev, id_entry->name); return 0; } return ENXIO; } -int drm_attach(device_t nbdev, drm_pci_id_list_t *idlist) +int drm_attach(device_t kdev, drm_pci_id_list_t *idlist) { struct drm_device *dev; drm_pci_id_list_t *id_entry; int unit, msicount; - unit = device_get_unit(nbdev); - dev = device_get_softc(nbdev); + unit = device_get_unit(kdev); + dev = device_get_softc(kdev); #if __FreeBSD_version < 700010 - if (!strcmp(device_get_name(nbdev), "drmsub")) - dev->device = device_get_parent(nbdev); + if (!strcmp(device_get_name(kdev), "drmsub")) + dev->device = device_get_parent(kdev); else - dev->device = nbdev; + dev->device = kdev; #else - dev->device = nbdev; + dev->device = kdev; #endif dev->devnode = make_dev(&drm_cdevsw, unit, @@ -256,11 +256,11 @@ int drm_attach(device_t nbdev, drm_pci_id_list_t *idlist) return drm_load(dev); } -int drm_detach(device_t nbdev) +int drm_detach(device_t kdev) { struct drm_device *dev; - dev = device_get_softc(nbdev); + dev = device_get_softc(kdev); drm_unload(dev); diff --git a/bsd-core/i915_drv.c b/bsd-core/i915_drv.c index a323ac3c..1f7cfa46 100644 --- a/bsd-core/i915_drv.c +++ b/bsd-core/i915_drv.c @@ -40,9 +40,9 @@ static drm_pci_id_list_t i915_pciidlist[] = { i915_PCI_IDS }; -static int i915_suspend(device_t nbdev) +static int i915_suspend(device_t kdev) { - struct drm_device *dev = device_get_softc(nbdev); + struct drm_device *dev = device_get_softc(kdev); struct drm_i915_private *dev_priv = dev->dev_private; if (!dev || !dev_priv) { @@ -54,16 +54,16 @@ static int i915_suspend(device_t nbdev) i915_save_state(dev); - return (bus_generic_suspend(nbdev)); + return (bus_generic_suspend(kdev)); } -static int i915_resume(device_t nbdev) +static int i915_resume(device_t kdev) { - struct drm_device *dev = device_get_softc(nbdev); + struct drm_device *dev = device_get_softc(kdev); i915_restore_state(dev); - return (bus_generic_resume(nbdev)); + return (bus_generic_resume(kdev)); } static void i915_configure(struct drm_device *dev) @@ -97,31 +97,31 @@ static void i915_configure(struct drm_device *dev) } static int -i915_probe(device_t dev) +i915_probe(device_t kdev) { - return drm_probe(dev, i915_pciidlist); + return drm_probe(kdev, i915_pciidlist); } static int -i915_attach(device_t nbdev) +i915_attach(device_t kdev) { - struct drm_device *dev = device_get_softc(nbdev); + struct drm_device *dev = device_get_softc(kdev); dev->driver = malloc(sizeof(struct drm_driver_info), DRM_MEM_DRIVER, M_WAITOK | M_ZERO); i915_configure(dev); - return drm_attach(nbdev, i915_pciidlist); + return drm_attach(kdev, i915_pciidlist); } static int -i915_detach(device_t nbdev) +i915_detach(device_t kdev) { - struct drm_device *dev = device_get_softc(nbdev); + struct drm_device *dev = device_get_softc(kdev); int ret; - ret = drm_detach(nbdev); + ret = drm_detach(kdev); free(dev->driver, DRM_MEM_DRIVER); diff --git a/bsd-core/mach64_drv.c b/bsd-core/mach64_drv.c index f73e7730..2cc0ef1e 100644 --- a/bsd-core/mach64_drv.c +++ b/bsd-core/mach64_drv.c @@ -74,22 +74,22 @@ static void mach64_configure(struct drm_device *dev) } static int -mach64_probe(device_t dev) +mach64_probe(device_t kdev) { - return drm_probe(dev, mach64_pciidlist); + return drm_probe(kdev, mach64_pciidlist); } static int -mach64_attach(device_t nbdev) +mach64_attach(device_t kdev) { - struct drm_device *dev = device_get_softc(nbdev); + struct drm_device *dev = device_get_softc(kdev); dev->driver = malloc(sizeof(struct drm_driver_info), DRM_MEM_DRIVER, M_WAITOK | M_ZERO); mach64_configure(dev); - return drm_attach(nbdev, mach64_pciidlist); + return drm_attach(kdev, mach64_pciidlist); } int @@ -99,12 +99,12 @@ mach64_driver_load(struct drm_device * dev, unsigned long flags) } static int -mach64_detach(device_t nbdev) +mach64_detach(device_t kdev) { - struct drm_device *dev = device_get_softc(nbdev); + struct drm_device *dev = device_get_softc(kdev); int ret; - ret = drm_detach(nbdev); + ret = drm_detach(kdev); free(dev->driver, DRM_MEM_DRIVER); diff --git a/bsd-core/mga_drv.c b/bsd-core/mga_drv.c index af250e83..d72215f3 100644 --- a/bsd-core/mga_drv.c +++ b/bsd-core/mga_drv.c @@ -117,31 +117,31 @@ static void mga_configure(struct drm_device *dev) } static int -mga_probe(device_t dev) +mga_probe(device_t kdev) { - return drm_probe(dev, mga_pciidlist); + return drm_probe(kdev, mga_pciidlist); } static int -mga_attach(device_t nbdev) +mga_attach(device_t kdev) { - struct drm_device *dev = device_get_softc(nbdev); + struct drm_device *dev = device_get_softc(kdev); dev->driver = malloc(sizeof(struct drm_driver_info), DRM_MEM_DRIVER, M_WAITOK | M_ZERO); mga_configure(dev); - return drm_attach(nbdev, mga_pciidlist); + return drm_attach(kdev, mga_pciidlist); } static int -mga_detach(device_t nbdev) +mga_detach(device_t kdev) { - struct drm_device *dev = device_get_softc(nbdev); + struct drm_device *dev = device_get_softc(kdev); int ret; - ret = drm_detach(nbdev); + ret = drm_detach(kdev); free(dev->driver, DRM_MEM_DRIVER); diff --git a/bsd-core/r128_drv.c b/bsd-core/r128_drv.c index f28bcf2c..a783d581 100644 --- a/bsd-core/r128_drv.c +++ b/bsd-core/r128_drv.c @@ -73,22 +73,22 @@ static void r128_configure(struct drm_device *dev) } static int -r128_probe(device_t dev) +r128_probe(device_t kdev) { - return drm_probe(dev, r128_pciidlist); + return drm_probe(kdev, r128_pciidlist); } static int -r128_attach(device_t nbdev) +r128_attach(device_t kdev) { - struct drm_device *dev = device_get_softc(nbdev); + struct drm_device *dev = device_get_softc(kdev); dev->driver = malloc(sizeof(struct drm_driver_info), DRM_MEM_DRIVER, M_WAITOK | M_ZERO); r128_configure(dev); - return drm_attach(nbdev, r128_pciidlist); + return drm_attach(kdev, r128_pciidlist); } int r128_driver_load(struct drm_device * dev, unsigned long flags) @@ -97,12 +97,12 @@ int r128_driver_load(struct drm_device * dev, unsigned long flags) } static int -r128_detach(device_t nbdev) +r128_detach(device_t kdev) { - struct drm_device *dev = device_get_softc(nbdev); + struct drm_device *dev = device_get_softc(kdev); int ret; - ret = drm_detach(nbdev); + ret = drm_detach(kdev); free(dev->driver, DRM_MEM_DRIVER); diff --git a/bsd-core/radeon_drv.c b/bsd-core/radeon_drv.c index 46bccb39..7bc77daa 100644 --- a/bsd-core/radeon_drv.c +++ b/bsd-core/radeon_drv.c @@ -77,31 +77,31 @@ static void radeon_configure(struct drm_device *dev) } static int -radeon_probe(device_t dev) +radeon_probe(device_t kdev) { - return drm_probe(dev, radeon_pciidlist); + return drm_probe(kdev, radeon_pciidlist); } static int -radeon_attach(device_t nbdev) +radeon_attach(device_t kdev) { - struct drm_device *dev = device_get_softc(nbdev); + struct drm_device *dev = device_get_softc(kdev); dev->driver = malloc(sizeof(struct drm_driver_info), DRM_MEM_DRIVER, M_WAITOK | M_ZERO); radeon_configure(dev); - return drm_attach(nbdev, radeon_pciidlist); + return drm_attach(kdev, radeon_pciidlist); } static int -radeon_detach(device_t nbdev) +radeon_detach(device_t kdev) { - struct drm_device *dev = device_get_softc(nbdev); + struct drm_device *dev = device_get_softc(kdev); int ret; - ret = drm_detach(nbdev); + ret = drm_detach(kdev); free(dev->driver, DRM_MEM_DRIVER); diff --git a/bsd-core/savage_drv.c b/bsd-core/savage_drv.c index 96643aae..c5376e7b 100644 --- a/bsd-core/savage_drv.c +++ b/bsd-core/savage_drv.c @@ -63,31 +63,31 @@ static void savage_configure(struct drm_device *dev) } static int -savage_probe(device_t dev) +savage_probe(device_t kdev) { - return drm_probe(dev, savage_pciidlist); + return drm_probe(kdev, savage_pciidlist); } static int -savage_attach(device_t nbdev) +savage_attach(device_t kdev) { - struct drm_device *dev = device_get_softc(nbdev); + struct drm_device *dev = device_get_softc(kdev); dev->driver = malloc(sizeof(struct drm_driver_info), DRM_MEM_DRIVER, M_WAITOK | M_ZERO); savage_configure(dev); - return drm_attach(nbdev, savage_pciidlist); + return drm_attach(kdev, savage_pciidlist); } static int -savage_detach(device_t nbdev) +savage_detach(device_t kdev) { - struct drm_device *dev = device_get_softc(nbdev); + struct drm_device *dev = device_get_softc(kdev); int ret; - ret = drm_detach(nbdev); + ret = drm_detach(kdev); free(dev->driver, DRM_MEM_DRIVER); diff --git a/bsd-core/sis_drv.c b/bsd-core/sis_drv.c index 2b6be29f..a294246a 100644 --- a/bsd-core/sis_drv.c +++ b/bsd-core/sis_drv.c @@ -57,31 +57,31 @@ static void sis_configure(struct drm_device *dev) } static int -sis_probe(device_t dev) +sis_probe(device_t kdev) { - return drm_probe(dev, sis_pciidlist); + return drm_probe(kdev, sis_pciidlist); } static int -sis_attach(device_t nbdev) +sis_attach(device_t kdev) { - struct drm_device *dev = device_get_softc(nbdev); + struct drm_device *dev = device_get_softc(kdev); dev->driver = malloc(sizeof(struct drm_driver_info), DRM_MEM_DRIVER, M_WAITOK | M_ZERO); sis_configure(dev); - return drm_attach(nbdev, sis_pciidlist); + return drm_attach(kdev, sis_pciidlist); } static int -sis_detach(device_t nbdev) +sis_detach(device_t kdev) { - struct drm_device *dev = device_get_softc(nbdev); + struct drm_device *dev = device_get_softc(kdev); int ret; - ret = drm_detach(nbdev); + ret = drm_detach(kdev); free(dev->driver, DRM_MEM_DRIVER); diff --git a/bsd-core/tdfx_drv.c b/bsd-core/tdfx_drv.c index 775efcc1..f293f4b3 100644 --- a/bsd-core/tdfx_drv.c +++ b/bsd-core/tdfx_drv.c @@ -59,31 +59,31 @@ static void tdfx_configure(struct drm_device *dev) } static int -tdfx_probe(device_t dev) +tdfx_probe(device_t kdev) { - return drm_probe(dev, tdfx_pciidlist); + return drm_probe(kdev, tdfx_pciidlist); } static int -tdfx_attach(device_t nbdev) +tdfx_attach(device_t kdev) { - struct drm_device *dev = device_get_softc(nbdev); + struct drm_device *dev = device_get_softc(kdev); dev->driver = malloc(sizeof(struct drm_driver_info), DRM_MEM_DRIVER, M_WAITOK | M_ZERO); tdfx_configure(dev); - return drm_attach(nbdev, tdfx_pciidlist); + return drm_attach(kdev, tdfx_pciidlist); } static int -tdfx_detach(device_t nbdev) +tdfx_detach(device_t kdev) { - struct drm_device *dev = device_get_softc(nbdev); + struct drm_device *dev = device_get_softc(kdev); int ret; - ret = drm_detach(nbdev); + ret = drm_detach(kdev); free(dev->driver, DRM_MEM_DRIVER); diff --git a/bsd-core/via_drv.c b/bsd-core/via_drv.c index cae7231c..5a2307eb 100644 --- a/bsd-core/via_drv.c +++ b/bsd-core/via_drv.c @@ -70,31 +70,31 @@ static void via_configure(struct drm_device *dev) } static int -via_probe(device_t dev) +via_probe(device_t kdev) { - return drm_probe(dev, via_pciidlist); + return drm_probe(kdev, via_pciidlist); } static int -via_attach(device_t nbdev) +via_attach(device_t kdev) { - struct drm_device *dev = device_get_softc(nbdev); + struct drm_device *dev = device_get_softc(kdev); dev->driver = malloc(sizeof(struct drm_driver_info), DRM_MEM_DRIVER, M_WAITOK | M_ZERO); via_configure(dev); - return drm_attach(nbdev, via_pciidlist); + return drm_attach(kdev, via_pciidlist); } static int -via_detach(device_t nbdev) +via_detach(device_t kdev) { - struct drm_device *dev = device_get_softc(nbdev); + struct drm_device *dev = device_get_softc(kdev); int ret; - ret = drm_detach(nbdev); + ret = drm_detach(kdev); free(dev->driver, DRM_MEM_DRIVER); |