summaryrefstree
path: root/kernel/drivers/misc/tzdev/tz_cdev.h
blob: b2e18d028c662da900336c9a4413a660a7615238 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*
 * Copyright (C) 2016 Samsung Electronics, Inc.
 *
 * This software is licensed under the terms of the GNU General Public
 * License version 2, as published by the Free Software Foundation, and
 * may be copied, distributed, and modified under those terms.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

#ifndef __TZ_CDEV_H__
#define __TZ_CDEV_H__

#include <linux/cdev.h>
#include <linux/device.h>

struct tz_cdev {
	const char *name;
	struct module *owner;
	const struct file_operations *fops;
	struct device *device;
	struct cdev cdev;
	struct class *class;
	dev_t dev;
};

int tz_cdev_register(struct tz_cdev *cdev);
void tz_cdev_unregister(struct tz_cdev *cdev);

#endif /* __TZ_CDEV_H__ */