#include <linux/cleanup.h>
#include <linux/container_of.h>
#include <linux/device.h>
#include <linux/idr.h>
#include <linux/module.h>
#include <linux/serial_core.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include "serial_base.h"
static bool serial_base_initialized;
static const struct device_type serial_ctrl_type = …;
static const struct device_type serial_port_type = …;
static int serial_base_match(struct device *dev, const struct device_driver *drv)
{ … }
static const struct bus_type serial_base_bus_type = …;
int serial_base_driver_register(struct device_driver *driver)
{ … }
void serial_base_driver_unregister(struct device_driver *driver)
{ … }
static int serial_base_device_init(struct uart_port *port,
struct device *dev,
struct device *parent_dev,
const struct device_type *type,
void (*release)(struct device *dev),
unsigned int ctrl_id,
unsigned int port_id)
{ … }
static void serial_base_ctrl_release(struct device *dev)
{ … }
void serial_base_ctrl_device_remove(struct serial_ctrl_device *ctrl_dev)
{ … }
struct serial_ctrl_device *serial_base_ctrl_add(struct uart_port *port,
struct device *parent)
{ … }
static void serial_base_port_release(struct device *dev)
{ … }
struct serial_port_device *serial_base_port_add(struct uart_port *port,
struct serial_ctrl_device *ctrl_dev)
{ … }
void serial_base_port_device_remove(struct serial_port_device *port_dev)
{ … }
#ifdef CONFIG_SERIAL_CORE_CONSOLE
int serial_base_match_and_update_preferred_console(struct uart_driver *drv,
struct uart_port *port)
{ … }
#endif
static int serial_base_init(void)
{ … }
arch_initcall(serial_base_init);
static void serial_base_exit(void)
{ … }
module_exit(serial_base_exit);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;