summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpiolib-cdev.h
blob: cb41dd757338068000e7b69404f76c2380d61c7b (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
/* SPDX-License-Identifier: GPL-2.0 */

#ifndef GPIOLIB_CDEV_H
#define GPIOLIB_CDEV_H

#include <linux/types.h>

struct gpio_device;

#ifdef CONFIG_GPIO_CDEV

int gpiolib_cdev_register(struct gpio_device *gdev, dev_t devt);
void gpiolib_cdev_unregister(struct gpio_device *gdev);

#else

static inline int gpiolib_cdev_register(struct gpio_device *gdev, dev_t devt)
{
	return 0;
}

static inline void gpiolib_cdev_unregister(struct gpio_device *gdev)
{
}

#endif /* CONFIG_GPIO_CDEV */

#endif /* GPIOLIB_CDEV_H */