---
name: "devm_mdiobus_alloc_size"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/devm_mdiobus_alloc_size"
---

# devm\_mdiobus\_alloc\_size(9)

Resource-managed mdiobus\_alloc\_size

## NAME

devm\_mdiobus\_alloc\_size - Resource-managed **mdiobus\_alloc\_size**

## SYNOPSIS

**struct mii\_bus \* devm\_mdiobus\_alloc\_size(struct device \*** *dev***, int** *sizeof\_priv***);**

## ARGUMENTS

*dev*

Device to allocate mii\_bus for

*sizeof\_priv*

Space to allocate for private structure.

## DESCRIPTION

Managed mdiobus\_alloc\_size. mii\_bus allocated with this function is automatically freed on driver detach.

If an mii\_bus allocated with this function needs to be freed separately, **devm\_mdiobus\_free** must be used.

## RETURN

Pointer to allocated mii\_bus on success, NULL on failure.

## COPYRIGHT
