Author: dumbbell
Date: Tue Aug  9 19:32:06 2016
New Revision: 303890
URL: https://svnweb.freebsd.org/changeset/base/303890

Log:
  Consistently use `device_t`
  
  Several files use the internal name of `struct device` instead of
  `device_t` which is part of the public API. This patch changes all
  `struct device *` to `device_t`.
  
  The remaining occurrences of `struct device` are those referring to the
  Linux or OpenBSD version of the structure, or the code is not built on
  FreeBSD and it's unclear what to do.
  
  Submitted by: Matthew Macy <mm...@nextbsd.org> (previous version)
  Approved by:  emaste, jhibbits, sbruno
  MFC after:    3 days
  Differential Revision:        https://reviews.freebsd.org/D7447

Modified:
  head/sys/contrib/ncsw/user/env/xx.c
  head/sys/contrib/octeon-sdk/cvmx-twsi.c
  head/sys/dev/auxio/auxio.c
  head/sys/dev/bktr/bktr_os.c
  head/sys/dev/bktr/bktr_reg.h
  head/sys/dev/e1000/e1000_osdep.h
  head/sys/dev/e1000/if_em.h
  head/sys/dev/e1000/if_igb.h
  head/sys/dev/e1000/if_lem.h
  head/sys/dev/ixgb/if_ixgb.h
  head/sys/dev/ixgb/if_ixgb_osdep.h
  head/sys/dev/ixgbe/ixgbe.h
  head/sys/dev/ixl/i40e_osdep.h
  head/sys/dev/ixl/ixl.h
  head/sys/dev/ixl/ixl_pf.h
  head/sys/dev/ixl/ixlv.h
  head/sys/dev/netmap/netmap_mem2.c
  head/sys/dev/pci/pcivar.h
  head/sys/dev/sound/sbus/cs4231.c
  head/sys/dev/tpm/tpm.c
  head/sys/kern/subr_bus.c
  head/sys/mips/nlm/dev/net/xlpge.c
  head/sys/mips/rmi/dev/nlge/if_nlge.c
  head/sys/powerpc/include/bus_dma.h
  head/sys/powerpc/powerpc/busdma_machdep.c
  head/sys/sparc64/fhc/clkbrd.c
  head/sys/sys/pcpu.h
  head/sys/sys/rman.h

Modified: head/sys/contrib/ncsw/user/env/xx.c
==============================================================================
--- head/sys/contrib/ncsw/user/env/xx.c Tue Aug  9 19:20:53 2016        
(r303889)
+++ head/sys/contrib/ncsw/user/env/xx.c Tue Aug  9 19:32:06 2016        
(r303890)
@@ -406,7 +406,7 @@ XX_DeallocIntr(int irq)
 t_Error
 XX_SetIntr(int irq, t_Isr *f_Isr, t_Handle handle)
 {
-       struct device *dev;
+       device_t dev;
        struct resource *r;
        unsigned int flags;
        int err;
@@ -455,7 +455,7 @@ finish:
 t_Error
 XX_FreeIntr(int irq)
 {
-       struct device *dev;
+       device_t dev;
        struct resource *r;
 
        r = (struct resource *)irq;

Modified: head/sys/contrib/octeon-sdk/cvmx-twsi.c
==============================================================================
--- head/sys/contrib/octeon-sdk/cvmx-twsi.c     Tue Aug  9 19:20:53 2016        
(r303889)
+++ head/sys/contrib/octeon-sdk/cvmx-twsi.c     Tue Aug  9 19:32:06 2016        
(r303890)
@@ -85,7 +85,7 @@ static struct i2c_adapter *__cvmx_twsix_
                resource_size_t twsi_phys;
                void __iomem *twsi_base;
                resource_size_t regsize;
-               struct device *dev;
+               device_t dev;
                int broken_irq_mode;
        };
        struct i2c_adapter *adapter;

Modified: head/sys/dev/auxio/auxio.c
==============================================================================
--- head/sys/dev/auxio/auxio.c  Tue Aug  9 19:20:53 2016        (r303889)
+++ head/sys/dev/auxio/auxio.c  Tue Aug  9 19:32:06 2016        (r303890)
@@ -98,7 +98,7 @@ __FBSDID("$FreeBSD$");
 #define AUXIO_PCIO_NREG        5
 
 struct auxio_softc {
-       struct device           *sc_dev;
+       device_t                sc_dev;
 
        int                     sc_nauxio;
        struct resource         *sc_res[AUXIO_PCIO_NREG];

Modified: head/sys/dev/bktr/bktr_os.c
==============================================================================
--- head/sys/dev/bktr/bktr_os.c Tue Aug  9 19:20:53 2016        (r303889)
+++ head/sys/dev/bktr/bktr_os.c Tue Aug  9 19:32:06 2016        (r303890)
@@ -889,10 +889,11 @@ vm_offset_t vm_page_alloc_contig(vm_offs
 
 #if defined(__OpenBSD__)
 static int      bktr_probe(struct device *, void *, void *);
+static void     bktr_attach(struct device *, struct device *, void *);
 #else
-static int      bktr_probe(struct device *, struct cfdata *, void *);
+static int      bktr_probe(device_t, struct cfdata *, void *);
+static void     bktr_attach(device_t, device_t, void *);
 #endif
-static void     bktr_attach(struct device *, struct device *, void *);
 
 struct cfattach bktr_ca = {
         sizeof(struct bktr_softc), bktr_probe, bktr_attach
@@ -908,10 +909,11 @@ struct cfdriver bktr_cd = {
 
 int
 bktr_probe(parent, match, aux)
-       struct device *parent;
 #if defined(__OpenBSD__)
+        struct device *parent;
         void *match;
 #else
+        device_t parent;
         struct cfdata *match;
 #endif
         void *aux;
@@ -933,7 +935,15 @@ bktr_probe(parent, match, aux)
  * the attach routine.
  */
 static void
-bktr_attach(struct device *parent, struct device *self, void *aux)
+bktr_attach(parent, self, aux)
+#if defined(__OpenBSD__)
+       struct device *parent;
+       struct device *self;
+#else
+       device_t parent;
+       device_t self;
+#endif
+       void *aux;
 {
        bktr_ptr_t      bktr;
        u_long          latency;

Modified: head/sys/dev/bktr/bktr_reg.h
==============================================================================
--- head/sys/dev/bktr/bktr_reg.h        Tue Aug  9 19:20:53 2016        
(r303889)
+++ head/sys/dev/bktr/bktr_reg.h        Tue Aug  9 19:32:06 2016        
(r303890)
@@ -35,7 +35,7 @@
  */
 
 #ifdef __NetBSD__
-#include <machine/bus.h>               /* struct device */
+#include <machine/bus.h>               /* device_t */
 #include <sys/device.h>
 #include <sys/select.h>                        /* struct selinfo */
 # ifdef DEBUG

Modified: head/sys/dev/e1000/e1000_osdep.h
==============================================================================
--- head/sys/dev/e1000/e1000_osdep.h    Tue Aug  9 19:20:53 2016        
(r303889)
+++ head/sys/dev/e1000/e1000_osdep.h    Tue Aug  9 19:32:06 2016        
(r303890)
@@ -134,7 +134,7 @@ struct e1000_osdep
        bus_space_handle_t io_bus_space_handle;
        bus_space_tag_t    flash_bus_space_tag;
        bus_space_handle_t flash_bus_space_handle;
-       struct device     *dev;
+       device_t           dev;
 };
 
 #define E1000_REGISTER(hw, reg) (((hw)->mac.type >= e1000_82543) \

Modified: head/sys/dev/e1000/if_em.h
==============================================================================
--- head/sys/dev/e1000/if_em.h  Tue Aug  9 19:20:53 2016        (r303889)
+++ head/sys/dev/e1000/if_em.h  Tue Aug  9 19:32:06 2016        (r303890)
@@ -394,7 +394,7 @@ struct adapter {
 
        /* FreeBSD operating-system-specific structures. */
        struct e1000_osdep osdep;
-       struct device   *dev;
+       device_t        dev;
        struct cdev     *led_dev;
 
        struct resource *memory;

Modified: head/sys/dev/e1000/if_igb.h
==============================================================================
--- head/sys/dev/e1000/if_igb.h Tue Aug  9 19:20:53 2016        (r303889)
+++ head/sys/dev/e1000/if_igb.h Tue Aug  9 19:32:06 2016        (r303890)
@@ -429,7 +429,7 @@ struct adapter {
        struct e1000_hw         hw;
 
        struct e1000_osdep      osdep;
-       struct device           *dev;
+       device_t                dev;
        struct cdev             *led_dev;
 
        struct resource         *pci_mem;

Modified: head/sys/dev/e1000/if_lem.h
==============================================================================
--- head/sys/dev/e1000/if_lem.h Tue Aug  9 19:20:53 2016        (r303889)
+++ head/sys/dev/e1000/if_lem.h Tue Aug  9 19:32:06 2016        (r303890)
@@ -298,7 +298,7 @@ struct adapter {
 
        /* FreeBSD operating-system-specific structures. */
        struct e1000_osdep osdep;
-       struct device   *dev;
+       device_t        dev;
        struct cdev     *led_dev;
 
        struct resource *memory;

Modified: head/sys/dev/ixgb/if_ixgb.h
==============================================================================
--- head/sys/dev/ixgb/if_ixgb.h Tue Aug  9 19:20:53 2016        (r303889)
+++ head/sys/dev/ixgb/if_ixgb.h Tue Aug  9 19:32:06 2016        (r303890)
@@ -277,7 +277,7 @@ struct adapter {
 
        /* FreeBSD operating-system-specific structures */
        struct ixgb_osdep osdep;
-       struct device  *dev;
+       device_t        dev;
        struct resource *res_memory;
        struct resource *res_ioport;
        struct resource *res_interrupt;

Modified: head/sys/dev/ixgb/if_ixgb_osdep.h
==============================================================================
--- head/sys/dev/ixgb/if_ixgb_osdep.h   Tue Aug  9 19:20:53 2016        
(r303889)
+++ head/sys/dev/ixgb/if_ixgb_osdep.h   Tue Aug  9 19:32:06 2016        
(r303890)
@@ -90,7 +90,7 @@ struct ixgb_osdep
 {
        bus_space_tag_t    mem_bus_space_tag;
        bus_space_handle_t mem_bus_space_handle;
-       struct device     *dev;
+       device_t dev;
 };
 
 #define IXGB_WRITE_FLUSH(a) IXGB_READ_REG(a, STATUS)

Modified: head/sys/dev/ixgbe/ixgbe.h
==============================================================================
--- head/sys/dev/ixgbe/ixgbe.h  Tue Aug  9 19:20:53 2016        (r303889)
+++ head/sys/dev/ixgbe/ixgbe.h  Tue Aug  9 19:32:06 2016        (r303890)
@@ -458,7 +458,7 @@ struct adapter {
        struct ixgbe_hw         hw;
        struct ixgbe_osdep      osdep;
 
-       struct device           *dev;
+       device_t                dev;
        struct ifnet            *ifp;
 
        struct resource         *pci_mem;

Modified: head/sys/dev/ixl/i40e_osdep.h
==============================================================================
--- head/sys/dev/ixl/i40e_osdep.h       Tue Aug  9 19:20:53 2016        
(r303889)
+++ head/sys/dev/ixl/i40e_osdep.h       Tue Aug  9 19:32:06 2016        
(r303890)
@@ -151,7 +151,7 @@ struct i40e_osdep {
        bus_space_handle_t      mem_bus_space_handle;
        bus_size_t              mem_bus_space_size;
        uint32_t                flush_reg;
-       struct device           *dev;
+       device_t                dev;
 };
 
 struct i40e_dma_mem {

Modified: head/sys/dev/ixl/ixl.h
==============================================================================
--- head/sys/dev/ixl/ixl.h      Tue Aug  9 19:20:53 2016        (r303889)
+++ head/sys/dev/ixl/ixl.h      Tue Aug  9 19:32:06 2016        (r303890)
@@ -512,7 +512,7 @@ SLIST_HEAD(ixl_ftl_head, ixl_mac_filter)
 struct ixl_vsi {
        void                    *back;
        struct ifnet            *ifp;
-       struct device           *dev;
+       device_t                dev;
        struct i40e_hw          *hw;
        struct ifmedia          media;
        enum i40e_vsi_type      type;

Modified: head/sys/dev/ixl/ixl_pf.h
==============================================================================
--- head/sys/dev/ixl/ixl_pf.h   Tue Aug  9 19:20:53 2016        (r303889)
+++ head/sys/dev/ixl/ixl_pf.h   Tue Aug  9 19:32:06 2016        (r303890)
@@ -63,7 +63,7 @@ struct ixl_vf {
 struct ixl_pf {
        struct i40e_hw          hw;
        struct i40e_osdep       osdep;
-       struct device           *dev;
+       device_t                dev;
        struct ixl_vsi          vsi;
 
        struct resource         *pci_mem;

Modified: head/sys/dev/ixl/ixlv.h
==============================================================================
--- head/sys/dev/ixl/ixlv.h     Tue Aug  9 19:20:53 2016        (r303889)
+++ head/sys/dev/ixl/ixlv.h     Tue Aug  9 19:32:06 2016        (r303890)
@@ -115,7 +115,7 @@ SLIST_HEAD(vlan_list, ixlv_vlan_filter);
 struct ixlv_sc {
        struct i40e_hw          hw;
        struct i40e_osdep       osdep;
-       struct device           *dev;
+       device_t                dev;
 
        struct resource         *pci_mem;
        struct resource         *msix_mem;

Modified: head/sys/dev/netmap/netmap_mem2.c
==============================================================================
--- head/sys/dev/netmap/netmap_mem2.c   Tue Aug  9 19:20:53 2016        
(r303889)
+++ head/sys/dev/netmap/netmap_mem2.c   Tue Aug  9 19:32:06 2016        
(r303890)
@@ -201,7 +201,7 @@ NMD_DEFNACB(void, rings_delete);
 
 static int netmap_mem_map(struct netmap_obj_pool *, struct netmap_adapter *);
 static int netmap_mem_unmap(struct netmap_obj_pool *, struct netmap_adapter *);
-static int nm_mem_assign_group(struct netmap_mem_d *, struct device *);
+static int nm_mem_assign_group(struct netmap_mem_d *, device_t);
 
 #define NMA_LOCK_INIT(n)       NM_MTX_INIT((n)->nm_mtx)
 #define NMA_LOCK_DESTROY(n)    NM_MTX_DESTROY((n)->nm_mtx)
@@ -456,7 +456,7 @@ nm_mem_release_id(struct netmap_mem_d *n
 }
 
 static int
-nm_mem_assign_group(struct netmap_mem_d *nmd, struct device *dev)
+nm_mem_assign_group(struct netmap_mem_d *nmd, device_t dev)
 {
        int err = 0, id;
        id = nm_iommu_group_id(dev);

Modified: head/sys/dev/pci/pcivar.h
==============================================================================
--- head/sys/dev/pci/pcivar.h   Tue Aug  9 19:20:53 2016        (r303889)
+++ head/sys/dev/pci/pcivar.h   Tue Aug  9 19:32:06 2016        (r303890)
@@ -174,7 +174,7 @@ struct pcicfg_ea {
 
 /* config header information common to all header types */
 typedef struct pcicfg {
-    struct device *dev;                /* device which owns this */
+    device_t   dev;            /* device which owns this */
 
     STAILQ_HEAD(, pci_map) maps; /* BARs */
 

Modified: head/sys/dev/sound/sbus/cs4231.c
==============================================================================
--- head/sys/dev/sound/sbus/cs4231.c    Tue Aug  9 19:20:53 2016        
(r303889)
+++ head/sys/dev/sound/sbus/cs4231.c    Tue Aug  9 19:32:06 2016        
(r303890)
@@ -113,7 +113,7 @@ struct cs4231_channel {
 #define CS4231_RES_MEM_MAX     4
 #define CS4231_RES_IRQ_MAX     2
 struct cs4231_softc {
-       struct device           *sc_dev;
+       device_t                sc_dev;
        int                     sc_rid[CS4231_RES_MEM_MAX];
        struct resource         *sc_res[CS4231_RES_MEM_MAX];
        bus_space_handle_t      sc_regh[CS4231_RES_MEM_MAX];

Modified: head/sys/dev/tpm/tpm.c
==============================================================================
--- head/sys/dev/tpm/tpm.c      Tue Aug  9 19:20:53 2016        (r303889)
+++ head/sys/dev/tpm/tpm.c      Tue Aug  9 19:32:06 2016        (r303890)
@@ -175,8 +175,8 @@ struct cfdriver tpm_cd = {
        NULL, "tpm", DV_DULL
 };
 
-int    tpm_match(struct device *, void *, void *);
-void   tpm_attach(struct device *, struct device *, void *);
+int    tpm_match(device_t , void *, void *);
+void   tpm_attach(device_t , device_t , void *);
 
 struct cfattach tpm_ca = {
        sizeof(struct tpm_softc), tpm_match, tpm_attach
@@ -337,7 +337,7 @@ tpm_detach(device_t dev)
  * OpenBSD specific code for probing and attaching TPM to device tree.
  */
 int
-tpm_match(struct device *parent, void *match, void *aux)
+tpm_match(device_t parent, void *match, void *aux)
 {
        struct isa_attach_args *ia = aux;
        struct cfdata *cf = match;
@@ -370,7 +370,7 @@ tpm_match(struct device *parent, void *m
 }
 
 void
-tpm_attach(struct device *parent, struct device *self, void *aux)
+tpm_attach(device_t parent, device_t self, void *aux)
 {
        struct tpm_softc *sc = (struct tpm_softc *)self;
        struct isa_attach_args *ia = aux;

Modified: head/sys/kern/subr_bus.c
==============================================================================
--- head/sys/kern/subr_bus.c    Tue Aug  9 19:20:53 2016        (r303889)
+++ head/sys/kern/subr_bus.c    Tue Aug  9 19:32:06 2016        (r303890)
@@ -1794,7 +1794,7 @@ make_device(device_t parent, const char 
                dc = NULL;
        }
 
-       dev = malloc(sizeof(struct device), M_BUS, M_NOWAIT|M_ZERO);
+       dev = malloc(sizeof(*dev), M_BUS, M_NOWAIT|M_ZERO);
        if (!dev)
                return (NULL);
 
@@ -5278,7 +5278,7 @@ sysctl_devices(SYSCTL_HANDLER_ARGS)
        int                     *name = (int *)arg1;
        u_int                   namelen = arg2;
        int                     index;
-       struct device           *dev;
+       device_t                dev;
        struct u_device         udev;   /* XXX this is a bit big */
        int                     error;
 

Modified: head/sys/mips/nlm/dev/net/xlpge.c
==============================================================================
--- head/sys/mips/nlm/dev/net/xlpge.c   Tue Aug  9 19:20:53 2016        
(r303889)
+++ head/sys/mips/nlm/dev/net/xlpge.c   Tue Aug  9 19:32:06 2016        
(r303890)
@@ -175,8 +175,8 @@ static int nlm_xlpge_resume(device_t);
 static int nlm_xlpge_shutdown(device_t);
 
 /* mii override functions */
-static int nlm_xlpge_mii_read(struct device *, int, int);
-static int nlm_xlpge_mii_write(struct device *, int, int, int);
+static int nlm_xlpge_mii_read(device_t, int, int);
+static int nlm_xlpge_mii_write(device_t, int, int, int);
 static void nlm_xlpge_mii_statchg(device_t);
 
 static device_method_t nlm_xlpge_methods[] = {
@@ -1290,7 +1290,7 @@ nlm_xlpge_shutdown(device_t dev)
  * miibus function with custom implementation
  */
 static int
-nlm_xlpge_mii_read(struct device *dev, int phyaddr, int regidx)
+nlm_xlpge_mii_read(device_t dev, int phyaddr, int regidx)
 {
        struct nlm_xlpge_softc *sc;
        int val;
@@ -1306,7 +1306,7 @@ nlm_xlpge_mii_read(struct device *dev, i
 }
 
 static int
-nlm_xlpge_mii_write(struct device *dev, int phyaddr, int regidx, int val)
+nlm_xlpge_mii_write(device_t dev, int phyaddr, int regidx, int val)
 {
        struct nlm_xlpge_softc *sc;
 

Modified: head/sys/mips/rmi/dev/nlge/if_nlge.c
==============================================================================
--- head/sys/mips/rmi/dev/nlge/if_nlge.c        Tue Aug  9 19:20:53 2016        
(r303889)
+++ head/sys/mips/rmi/dev/nlge/if_nlge.c        Tue Aug  9 19:32:06 2016        
(r303890)
@@ -140,8 +140,8 @@ static int  nlge_ioctl(struct ifnet *, u_
 static int     nlge_tx(struct ifnet *ifp, struct mbuf *m);
 static void    nlge_rx(struct nlge_softc *sc, vm_paddr_t paddr, int len);
 
-static int     nlge_mii_write(struct device *, int, int, int);
-static int     nlge_mii_read(struct device *, int, int);
+static int     nlge_mii_write(device_t, int, int, int);
+static int     nlge_mii_read(device_t, int, int);
 static void    nlge_mac_mii_statchg(device_t);
 static int     nlge_mediachange(struct ifnet *ifp);
 static void    nlge_mediastatus(struct ifnet *ifp, struct ifmediareq *ifmr);
@@ -831,7 +831,7 @@ nlge_rx(struct nlge_softc *sc, vm_paddr_
 }
 
 static int
-nlge_mii_write(struct device *dev, int phyaddr, int regidx, int regval)
+nlge_mii_write(device_t dev, int phyaddr, int regidx, int regval)
 {
        struct nlge_softc *sc;
 
@@ -843,7 +843,7 @@ nlge_mii_write(struct device *dev, int p
 }
 
 static int
-nlge_mii_read(struct device *dev, int phyaddr, int regidx)
+nlge_mii_read(device_t dev, int phyaddr, int regidx)
 {
        struct nlge_softc *sc;
        int val;

Modified: head/sys/powerpc/include/bus_dma.h
==============================================================================
--- head/sys/powerpc/include/bus_dma.h  Tue Aug  9 19:20:53 2016        
(r303889)
+++ head/sys/powerpc/include/bus_dma.h  Tue Aug  9 19:32:06 2016        
(r303890)
@@ -30,8 +30,6 @@
 
 #include <sys/bus_dma.h>
 
-struct device;
-
-int bus_dma_tag_set_iommu(bus_dma_tag_t, struct device *iommu, void *cookie);
+int bus_dma_tag_set_iommu(bus_dma_tag_t, device_t iommu, void *cookie);
 
 #endif /* _POWERPC_BUS_DMA_H_ */

Modified: head/sys/powerpc/powerpc/busdma_machdep.c
==============================================================================
--- head/sys/powerpc/powerpc/busdma_machdep.c   Tue Aug  9 19:20:53 2016        
(r303889)
+++ head/sys/powerpc/powerpc/busdma_machdep.c   Tue Aug  9 19:32:06 2016        
(r303890)
@@ -1210,7 +1210,7 @@ busdma_swi(void)
 }
 
 int
-bus_dma_tag_set_iommu(bus_dma_tag_t tag, struct device *iommu, void *cookie)
+bus_dma_tag_set_iommu(bus_dma_tag_t tag, device_t iommu, void *cookie)
 {
        tag->iommu = iommu;
        tag->iommu_cookie = cookie;

Modified: head/sys/sparc64/fhc/clkbrd.c
==============================================================================
--- head/sys/sparc64/fhc/clkbrd.c       Tue Aug  9 19:20:53 2016        
(r303889)
+++ head/sys/sparc64/fhc/clkbrd.c       Tue Aug  9 19:32:06 2016        
(r303890)
@@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$");
 #define        CLKBRD_CLKVER   2
 
 struct clkbrd_softc {
-       struct device           *sc_dev;
+       device_t                sc_dev;
        struct resource         *sc_res[CLKBRD_NREG];
        int                     sc_rid[CLKBRD_NREG];
        bus_space_tag_t         sc_bt[CLKBRD_NREG];

Modified: head/sys/sys/pcpu.h
==============================================================================
--- head/sys/sys/pcpu.h Tue Aug  9 19:20:53 2016        (r303889)
+++ head/sys/sys/pcpu.h Tue Aug  9 19:32:06 2016        (r303890)
@@ -160,7 +160,7 @@ struct pcpu {
        struct lock_list_entry *pc_spinlocks;
        struct vmmeter  pc_cnt;                 /* VM stats counters */
        long            pc_cp_time[CPUSTATES];  /* statclock ticks */
-       struct device   *pc_device;
+       device_t        pc_device;
        void            *pc_netisr;             /* netisr SWI cookie */
        int             pc_unused1;             /* unused field */
        int             pc_domain;              /* Memory domain. */

Modified: head/sys/sys/rman.h
==============================================================================
--- head/sys/sys/rman.h Tue Aug  9 19:20:53 2016        (r303889)
+++ head/sys/sys/rman.h Tue Aug  9 19:32:06 2016        (r303890)
@@ -127,7 +127,7 @@ int rman_first_free_region(struct rman *
 bus_space_handle_t rman_get_bushandle(struct resource *);
 bus_space_tag_t rman_get_bustag(struct resource *);
 rman_res_t     rman_get_end(struct resource *);
-struct device *rman_get_device(struct resource *);
+device_t rman_get_device(struct resource *);
 u_int  rman_get_flags(struct resource *);
 void   rman_get_mapping(struct resource *, struct resource_map *);
 int    rman_get_rid(struct resource *);
@@ -145,13 +145,13 @@ int       rman_is_region_manager(struct resour
 int    rman_release_resource(struct resource *r);
 struct resource *rman_reserve_resource(struct rman *rm, rman_res_t start,
                                        rman_res_t end, rman_res_t count,
-                                       u_int flags, struct device *dev);
+                                       u_int flags, device_t dev);
 struct resource *rman_reserve_resource_bound(struct rman *rm, rman_res_t start,
                                        rman_res_t end, rman_res_t count, 
rman_res_t bound,
-                                       u_int flags, struct device *dev);
+                                       u_int flags, device_t dev);
 void   rman_set_bushandle(struct resource *_r, bus_space_handle_t _h);
 void   rman_set_bustag(struct resource *_r, bus_space_tag_t _t);
-void   rman_set_device(struct resource *_r, struct device *_dev);
+void   rman_set_device(struct resource *_r, device_t _dev);
 void   rman_set_end(struct resource *_r, rman_res_t _end);
 void   rman_set_mapping(struct resource *, struct resource_map *);
 void   rman_set_rid(struct resource *_r, int _rid);
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to