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

# \_\_class\_create(9)

create a struct class structure

## NAME

\_\_class\_create - create a struct class structure

## SYNOPSIS

**struct class \* \_\_class\_create(struct module \*** *owner***, const char \*** *name***, struct lock\_class\_key \*** *key***);**

## ARGUMENTS

*owner*

pointer to the module that is to “own” this struct class

*name*

pointer to a string for the name of this class.

*key*

the lock\_class\_key for this class; used by mutex lock debugging

## DESCRIPTION

This is used to create a struct class pointer that can then be used in calls to **device\_create**.

Returns struct class pointer on success, or **ERR\_PTR** on error.

Note, the pointer created here is to be destroyed when finished by making a call to **class\_destroy**.

## COPYRIGHT
