---
name: "cdev_device_del"
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/cdev_device_del"
---

# cdev\_device\_del(9)

inverse of cdev\_device\_add

## NAME

cdev\_device\_del - inverse of cdev\_device\_add

## SYNOPSIS

**void cdev\_device\_del(struct cdev \*** *cdev***, struct device \*** *dev***);**

## ARGUMENTS

*cdev*

the cdev structure

*dev*

the device structure

## DESCRIPTION

**cdev\_device\_del** is a helper function to call cdev\_del and device\_del. It should be used whenever cdev\_device\_add is used.

If dev-\>devt is not set it will not remove the cdev and will be equivalent to device\_del.

## NOTE

This guarantees that associated sysfs callbacks are not running or runnable, however any cdevs already open will remain and their fops will still be callable even after this function returns.

## COPYRIGHT
