Scroll to navigation

CDEV_DEVICE_DEL(9) Char devices CDEV_DEVICE_DEL(9)

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

June 2024 Kernel Hackers Manual 3.10