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.
This patch was initially created by Kip Macy and is part of D6585. It was extracted and modified so it can be committed separately from the possible rename of FreeBSD's struct device.
FWIW, the following command was used to find all occurrences:
git grep -E 'struct +device[[:>:]]'