---
name: "devclass_get_device"
section: "9freebsd"
platform: "linux"
package: "freebsd-manpages"
version: "12.2-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/devclass_get_device/9freebsd"
---

# devclass\_get\_device(9freebsd)

translate unit number to device

## NAME

**devclass\_get\_device** – translate unit number to device

## SYNOPSIS

**#include \<sys/param.h\>**

**#include \<sys/bus.h\>**

*device\_t*\

**devclass\_get\_device**(*devclass\_t dc*, *int unit*);

## DESCRIPTION

This function retrieves the device instance with the given unit number and returns it.

## RETURN VALUES

If the device exists, it is returned, otherwise NULL is returned.

## SEE ALSO

[devclass(9)](/devclass/9.md), [device(9)](/device/9.md)

## AUTHORS

This manual page was written by Doug Rabson.
