]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Rename struct device to struct _device
authorMark Johnston <markj@FreeBSD.org>
Mon, 12 Apr 2021 13:32:30 +0000 (09:32 -0400)
committerMark Johnston <markj@FreeBSD.org>
Mon, 19 Apr 2021 18:17:08 +0000 (14:17 -0400)
commit5c00c82245764546b30c7152417cd6470fb16ac5
treec66713a42bd2a9ff11b0a0ea577d7e614b10132b
parent89a4cc5c8a3d916c679436a332bc16f80b073aa6
Rename struct device to struct _device

types.h defines device_t as a typedef of struct device *.  struct device
is defined in subr_bus.c and almost all of the kernel uses device_t.
The LinuxKPI also defines a struct device, so type confusion can occur.

This causes bugs and ambiguity for debugging tools.  Rename the FreeBSD
struct device to struct _device.

Reviewed by: gbe (man pages)
Reviewed by: rpokala, imp, jhb
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D29676

(cherry picked from commit dfff37765ce4ea4fd7db4d293b459dc84008f411)
share/man/man9/device.9
share/man/man9/rman.9
sys/kern/subr_bus.c
sys/powerpc/include/bus_dma.h
sys/sys/pcpu.h
sys/sys/systm.h
sys/sys/types.h