aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/subr_bus.c
diff options
context:
space:
mode:
authorJean-Sébastien Pédron <dumbbell@FreeBSD.org>2016-08-09 19:32:06 +0000
committerJean-Sébastien Pédron <dumbbell@FreeBSD.org>2016-08-09 19:32:06 +0000
commitbd937497ea2a1111d9cf6ff1cdbe698b3cdd430a (patch)
treecd36a4cc1858d305bf7632b49f8862e1ea5067dc /sys/kern/subr_bus.c
parent8e60fa95cb5d4ee7e70601a9b8542240fb1c2522 (diff)
downloadsrc-bd937497ea2a1111d9cf6ff1cdbe698b3cdd430a.tar.gz
src-bd937497ea2a1111d9cf6ff1cdbe698b3cdd430a.zip
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 <mmacy@nextbsd.org> (previous version) Approved by: emaste, jhibbits, sbruno MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D7447
Notes
Notes: svn path=/head/; revision=303890
Diffstat (limited to 'sys/kern/subr_bus.c')
-rw-r--r--sys/kern/subr_bus.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c
index af3ca57a178e..e1d8bc083d1a 100644
--- a/sys/kern/subr_bus.c
+++ b/sys/kern/subr_bus.c
@@ -1794,7 +1794,7 @@ make_device(device_t parent, const char *name, int unit)
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;