'\" t .\" Title: module_exit .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: May 2018 .\" Manual: Driver Basics .\" Source: Kernel Hackers Manual 3.16.56 .\" Language: English .\" .TH "MODULE_EXIT" "9" "May 2018" "Kernel Hackers Manual 3\&.16\&" "Driver Basics" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" module_exit \- driver exit entry point .SH "SYNOPSIS" .HP \w'module_exit('u .BI "module_exit(" "x" ");" .SH "ARGUMENTS" .PP \fIx\fR .RS 4 function to be run when driver is removed .RE .SH "DESCRIPTION" .PP \fBmodule_exit\fR will wrap the driver clean\-up code with \fBcleanup_module\fR when used with rmmod when the driver is a module\&. If the driver is statically compiled into the kernel, \fBmodule_exit\fR has no effect\&. There can only be one per module\&. .SH "COPYRIGHT" .br