---
name: "parport_register_driver"
section: "9"
platform: "linux"
package: "linux-manual-3.16"
version: "3.16.56-1+deb8u1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/parport_register_driver"
---

# parport\_register\_driver(9)

register a parallel port device driver

## NAME

parport\_register\_driver - register a parallel port device driver

## SYNOPSIS

**int parport\_register\_driver(struct parport\_driver \*** *drv***);**

## ARGUMENTS

*drv*

structure describing the driver

## DESCRIPTION

This can be called by a parallel port device driver in order to receive notifications about ports being found in the system, as well as ports no longer available.

The *drv* structure is allocated by the caller and must not be deallocated until after calling **parport\_unregister\_driver**.

The driver's **attach** function may block. The port that **attach** is given will be valid for the duration of the callback, but if the driver wants to take a copy of the pointer it must call **parport\_get\_port** to do so. Calling **parport\_register\_device** on that port will do this for you.

The driver's **detach** function may block. The port that **detach** is given will be valid for the duration of the callback, but if the driver wants to take a copy of the pointer it must call **parport\_get\_port** to do so.

Returns 0 on success. Currently it always succeeds.

## COPYRIGHT
