Right now types.h has device_t as a typedef of struct device *. struct
device is defined in subr_bus.c. This means that subsystems that define
a struct device can easily introduce type confusion. The LinuxKPI does
exactly this and there are a couple of bugs as a result.
The type confusion also causes problems for debuggers, since device_t
can refer to different structures depending on how the debugger tries to
resolve it to a type. It also results in type duplication in the CTF
type graph.
Rename struct device to struct _device to avoid these problems.
Almost all of the kernel refers to devices with device_t. A small
handful of drivers referenced struct device * instead, and I have
separate commits to fix those. This diff contains the main name change
and updates headers that shouldn't depend on types.h.