#include <linux/module.h>
#include <linux/slab.h>
#include <linux/idr.h>
#include <linux/io.h>
#include <linux/ipack.h>
#define to_ipack_dev(device) …
#define to_ipack_driver(drv) …
static DEFINE_IDA(ipack_ida);
static void ipack_device_release(struct device *dev)
{ … }
static inline const struct ipack_device_id *
ipack_match_one_device(const struct ipack_device_id *id,
const struct ipack_device *device)
{ … }
static const struct ipack_device_id *
ipack_match_id(const struct ipack_device_id *ids, struct ipack_device *idev)
{ … }
static int ipack_bus_match(struct device *dev, const struct device_driver *drv)
{ … }
static int ipack_bus_probe(struct device *device)
{ … }
static void ipack_bus_remove(struct device *device)
{ … }
static int ipack_uevent(const struct device *dev, struct kobj_uevent_env *env)
{ … }
#define ipack_device_attr(field, format_string) …
static ssize_t id_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static ssize_t
id_vendor_show(struct device *dev, struct device_attribute *attr, char *buf)
{ … }
static ssize_t
id_device_show(struct device *dev, struct device_attribute *attr, char *buf)
{ … }
static ssize_t modalias_show(struct device *dev, struct device_attribute *attr,
char *buf)
{ … }
ipack_device_attr(id_format, "0x%hhx\n");
static DEVICE_ATTR_RO(id);
static DEVICE_ATTR_RO(id_device);
static DEVICE_ATTR_RO(id_format);
static DEVICE_ATTR_RO(id_vendor);
static DEVICE_ATTR_RO(modalias);
static struct attribute *ipack_attrs[] = …;
ATTRIBUTE_GROUPS(…);
static const struct bus_type ipack_bus_type = …;
struct ipack_bus_device *ipack_bus_register(struct device *parent, int slots,
const struct ipack_bus_ops *ops,
struct module *owner)
{ … }
EXPORT_SYMBOL_GPL(…);
static int ipack_unregister_bus_member(struct device *dev, void *data)
{ … }
int ipack_bus_unregister(struct ipack_bus_device *bus)
{ … }
EXPORT_SYMBOL_GPL(…);
int ipack_driver_register(struct ipack_driver *edrv, struct module *owner,
const char *name)
{ … }
EXPORT_SYMBOL_GPL(…);
void ipack_driver_unregister(struct ipack_driver *edrv)
{ … }
EXPORT_SYMBOL_GPL(…);
static u16 ipack_crc_byte(u16 crc, u8 c)
{ … }
static u8 ipack_calc_crc1(struct ipack_device *dev)
{ … }
static u16 ipack_calc_crc2(struct ipack_device *dev)
{ … }
static void ipack_parse_id1(struct ipack_device *dev)
{ … }
static void ipack_parse_id2(struct ipack_device *dev)
{ … }
static int ipack_device_read_id(struct ipack_device *dev)
{ … }
int ipack_device_init(struct ipack_device *dev)
{ … }
EXPORT_SYMBOL_GPL(…);
int ipack_device_add(struct ipack_device *dev)
{ … }
EXPORT_SYMBOL_GPL(…);
void ipack_device_del(struct ipack_device *dev)
{ … }
EXPORT_SYMBOL_GPL(…);
void ipack_get_device(struct ipack_device *dev)
{ … }
EXPORT_SYMBOL_GPL(…);
void ipack_put_device(struct ipack_device *dev)
{ … }
EXPORT_SYMBOL_GPL(…);
static int __init ipack_init(void)
{ … }
static void __exit ipack_exit(void)
{ … }
module_init(…) …;
module_exit(ipack_exit);
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
MODULE_DESCRIPTION(…) …;