diff options
| author | Jean-Sébastien Pédron <dumbbell@FreeBSD.org> | 2016-08-09 19:32:06 +0000 |
|---|---|---|
| committer | Jean-Sébastien Pédron <dumbbell@FreeBSD.org> | 2016-08-09 19:32:06 +0000 |
| commit | bd937497ea2a1111d9cf6ff1cdbe698b3cdd430a (patch) | |
| tree | cd36a4cc1858d305bf7632b49f8862e1ea5067dc /sys/dev | |
| parent | 8e60fa95cb5d4ee7e70601a9b8542240fb1c2522 (diff) | |
Notes
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/auxio/auxio.c | 2 | ||||
| -rw-r--r-- | sys/dev/bktr/bktr_os.c | 18 | ||||
| -rw-r--r-- | sys/dev/bktr/bktr_reg.h | 2 | ||||
| -rw-r--r-- | sys/dev/e1000/e1000_osdep.h | 2 | ||||
| -rw-r--r-- | sys/dev/e1000/if_em.h | 2 | ||||
| -rw-r--r-- | sys/dev/e1000/if_igb.h | 2 | ||||
| -rw-r--r-- | sys/dev/e1000/if_lem.h | 2 | ||||
| -rw-r--r-- | sys/dev/ixgb/if_ixgb.h | 2 | ||||
| -rw-r--r-- | sys/dev/ixgb/if_ixgb_osdep.h | 2 | ||||
| -rw-r--r-- | sys/dev/ixgbe/ixgbe.h | 2 | ||||
| -rw-r--r-- | sys/dev/ixl/i40e_osdep.h | 2 | ||||
| -rw-r--r-- | sys/dev/ixl/ixl.h | 2 | ||||
| -rw-r--r-- | sys/dev/ixl/ixl_pf.h | 2 | ||||
| -rw-r--r-- | sys/dev/ixl/ixlv.h | 2 | ||||
| -rw-r--r-- | sys/dev/netmap/netmap_mem2.c | 4 | ||||
| -rw-r--r-- | sys/dev/pci/pcivar.h | 2 | ||||
| -rw-r--r-- | sys/dev/sound/sbus/cs4231.c | 2 | ||||
| -rw-r--r-- | sys/dev/tpm/tpm.c | 8 |
18 files changed, 35 insertions, 25 deletions
diff --git a/sys/dev/auxio/auxio.c b/sys/dev/auxio/auxio.c index b104d5af5ee9..f559c173b867 100644 --- a/sys/dev/auxio/auxio.c +++ b/sys/dev/auxio/auxio.c @@ -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]; diff --git a/sys/dev/bktr/bktr_os.c b/sys/dev/bktr/bktr_os.c index aa41454f0cab..42069b39db3b 100644 --- a/sys/dev/bktr/bktr_os.c +++ b/sys/dev/bktr/bktr_os.c @@ -889,10 +889,11 @@ vm_offset_t vm_page_alloc_contig(vm_offset_t, vm_offset_t, #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; diff --git a/sys/dev/bktr/bktr_reg.h b/sys/dev/bktr/bktr_reg.h index 4a3af1a490b0..65a6dbc359a0 100644 --- a/sys/dev/bktr/bktr_reg.h +++ b/sys/dev/bktr/bktr_reg.h @@ -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 diff --git a/sys/dev/e1000/e1000_osdep.h b/sys/dev/e1000/e1000_osdep.h index c0bf4182ec62..c7c23e582ca9 100644 --- a/sys/dev/e1000/e1000_osdep.h +++ b/sys/dev/e1000/e1000_osdep.h @@ -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) \ diff --git a/sys/dev/e1000/if_em.h b/sys/dev/e1000/if_em.h index c8c98cde6c02..2a2bf2ccb7ab 100644 --- a/sys/dev/e1000/if_em.h +++ b/sys/dev/e1000/if_em.h @@ -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; diff --git a/sys/dev/e1000/if_igb.h b/sys/dev/e1000/if_igb.h index a30fc993230c..e2f2219cc94c 100644 --- a/sys/dev/e1000/if_igb.h +++ b/sys/dev/e1000/if_igb.h @@ -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; diff --git a/sys/dev/e1000/if_lem.h b/sys/dev/e1000/if_lem.h index 2bdc21a2c335..4a27c34bd772 100644 --- a/sys/dev/e1000/if_lem.h +++ b/sys/dev/e1000/if_lem.h @@ -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; diff --git a/sys/dev/ixgb/if_ixgb.h b/sys/dev/ixgb/if_ixgb.h index e42dc1deca75..d7044a780f81 100644 --- a/sys/dev/ixgb/if_ixgb.h +++ b/sys/dev/ixgb/if_ixgb.h @@ -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; diff --git a/sys/dev/ixgb/if_ixgb_osdep.h b/sys/dev/ixgb/if_ixgb_osdep.h index e8ce885525bb..33b550a71f34 100644 --- a/sys/dev/ixgb/if_ixgb_osdep.h +++ b/sys/dev/ixgb/if_ixgb_osdep.h @@ -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) diff --git a/sys/dev/ixgbe/ixgbe.h b/sys/dev/ixgbe/ixgbe.h index 6a1522f82564..68f2edb57eef 100644 --- a/sys/dev/ixgbe/ixgbe.h +++ b/sys/dev/ixgbe/ixgbe.h @@ -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; diff --git a/sys/dev/ixl/i40e_osdep.h b/sys/dev/ixl/i40e_osdep.h index 184f125988da..7f9873d94aba 100644 --- a/sys/dev/ixl/i40e_osdep.h +++ b/sys/dev/ixl/i40e_osdep.h @@ -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 { diff --git a/sys/dev/ixl/ixl.h b/sys/dev/ixl/ixl.h index bfb708a709f5..1a92edbc15e7 100644 --- a/sys/dev/ixl/ixl.h +++ b/sys/dev/ixl/ixl.h @@ -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; diff --git a/sys/dev/ixl/ixl_pf.h b/sys/dev/ixl/ixl_pf.h index 1c31a9466579..107e30fded5d 100644 --- a/sys/dev/ixl/ixl_pf.h +++ b/sys/dev/ixl/ixl_pf.h @@ -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; diff --git a/sys/dev/ixl/ixlv.h b/sys/dev/ixl/ixlv.h index be4daeefbc83..888b4e0a2bc7 100644 --- a/sys/dev/ixl/ixlv.h +++ b/sys/dev/ixl/ixlv.h @@ -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; diff --git a/sys/dev/netmap/netmap_mem2.c b/sys/dev/netmap/netmap_mem2.c index 023604d49535..fd0c06bb8b57 100644 --- a/sys/dev/netmap/netmap_mem2.c +++ b/sys/dev/netmap/netmap_mem2.c @@ -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 *nmd) } 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); diff --git a/sys/dev/pci/pcivar.h b/sys/dev/pci/pcivar.h index 3180b4ef5de7..2e50af66c1c2 100644 --- a/sys/dev/pci/pcivar.h +++ b/sys/dev/pci/pcivar.h @@ -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 */ diff --git a/sys/dev/sound/sbus/cs4231.c b/sys/dev/sound/sbus/cs4231.c index 83f70f3a4813..7b80afcf0f9b 100644 --- a/sys/dev/sound/sbus/cs4231.c +++ b/sys/dev/sound/sbus/cs4231.c @@ -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]; diff --git a/sys/dev/tpm/tpm.c b/sys/dev/tpm/tpm.c index 3ac52d6e7691..3779c09f8193 100644 --- a/sys/dev/tpm/tpm.c +++ b/sys/dev/tpm/tpm.c @@ -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 *match, void *aux) } 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; |
