GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • The Linux Kernel
  • Development process
  • Submitting patches
  • Code of conduct
  • Maintainer handbook
  • All development-process docs
  • Core API
  • Driver APIs
  • Linux 802.11 Driver Developer’s Guide
  • ACPI Support
  • Kernel driver lp855x
  • The Common Clk Framework
  • Confidential Computing
  • Console Drivers

This view

  • Original page
  • New address

GeezerVison is showing docs.kernel.org — Miscellaneous Devices — The Linux Kernel documentation

Miscellaneous Devices¶

int misc_register(struct miscdevice *misc)¶

register a miscellaneous device

Parameters

struct miscdevice *misc

device structure

Description

Register a miscellaneous device with the kernel. If the minor number is set to MISC_DYNAMIC_MINOR a minor number is assigned and placed in the minor field of the structure. For other cases the minor number requested is used.

The structure passed is linked into the kernel and may not be destroyed until it has been unregistered. By default, an open() syscall to the device sets file->private_data to point to the structure. Drivers don’t need open in fops for this.

A zero is returned on success and a negative errno code for failure.

void misc_deregister(struct miscdevice *misc)¶

unregister a miscellaneous device

Parameters

struct miscdevice *misc

device to unregister

Description

Unregister a miscellaneous device that was previously successfully registered with misc_register().

©The kernel development community. | Powered by Sphinx 5.3.0 & Alabaster 0.7.16 | Page source
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.