#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/errno.h>
#include <linux/list.h>
#include <linux/delay.h>
#include <linux/workqueue.h>
#include <linux/crc32.h>
#include <linux/firmware.h>
#include <linux/kref.h>
#include <linux/dma-mapping.h>
#include <linux/slab.h>
#include <pcmcia/cistpl.h>
#include <pcmcia/ds.h>
#include <pcmcia/ss.h>
#include "cs_internal.h"
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
static void pcmcia_check_driver(struct pcmcia_driver *p_drv)
{ … }
struct pcmcia_dynid { … };
static ssize_t
new_id_store(struct device_driver *driver, const char *buf, size_t count)
{ … }
static DRIVER_ATTR_WO(new_id);
static void
pcmcia_free_dynids(struct pcmcia_driver *drv)
{ … }
static int
pcmcia_create_newid_file(struct pcmcia_driver *drv)
{ … }
static void
pcmcia_remove_newid_file(struct pcmcia_driver *drv)
{ … }
int pcmcia_register_driver(struct pcmcia_driver *driver)
{ … }
EXPORT_SYMBOL(…);
void pcmcia_unregister_driver(struct pcmcia_driver *driver)
{ … }
EXPORT_SYMBOL(…);
static struct pcmcia_device *pcmcia_get_dev(struct pcmcia_device *p_dev)
{ … }
static void pcmcia_put_dev(struct pcmcia_device *p_dev)
{ … }
static void pcmcia_release_function(struct kref *ref)
{ … }
static void pcmcia_release_dev(struct device *dev)
{ … }
static int pcmcia_device_probe(struct device *dev)
{ … }
static void pcmcia_card_remove(struct pcmcia_socket *s, struct pcmcia_device *leftover)
{ … }
static void pcmcia_device_remove(struct device *dev)
{ … }
static int pcmcia_device_query(struct pcmcia_device *p_dev)
{ … }
static struct pcmcia_device *pcmcia_device_add(struct pcmcia_socket *s,
unsigned int function)
{ … }
static int pcmcia_card_add(struct pcmcia_socket *s)
{ … }
static int pcmcia_requery_callback(struct device *dev, void *_data)
{ … }
static void pcmcia_requery(struct pcmcia_socket *s)
{ … }
#ifdef CONFIG_PCMCIA_LOAD_CIS
static int pcmcia_load_firmware(struct pcmcia_device *dev, char *filename)
{ … }
#else
static inline int pcmcia_load_firmware(struct pcmcia_device *dev,
char *filename)
{
return -ENODEV;
}
#endif
static inline int pcmcia_devmatch(struct pcmcia_device *dev,
const struct pcmcia_device_id *did)
{ … }
static int pcmcia_bus_match(struct device *dev, const struct device_driver *drv)
{ … }
static int pcmcia_bus_uevent(const struct device *dev, struct kobj_uevent_env *env)
{ … }
static int pcmcia_dev_suspend(struct device *dev);
static int pcmcia_dev_resume(struct device *dev);
static int runtime_suspend(struct device *dev)
{ … }
static int runtime_resume(struct device *dev)
{ … }
#define pcmcia_device_attr(field, test, format) …
#define pcmcia_device_stringattr(name, field) …
pcmcia_device_attr(func_id, has_func_id, "0x%02x\n");
pcmcia_device_attr(manf_id, has_manf_id, "0x%04x\n");
pcmcia_device_attr(card_id, has_card_id, "0x%04x\n");
pcmcia_device_stringattr(prod_id1, prod_id[0]);
pcmcia_device_stringattr(prod_id2, prod_id[1]);
pcmcia_device_stringattr(prod_id3, prod_id[2]);
pcmcia_device_stringattr(prod_id4, prod_id[3]);
static ssize_t function_show(struct device *dev, struct device_attribute *attr,
char *buf)
{ … }
static DEVICE_ATTR_RO(function);
static ssize_t resources_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(resources);
static ssize_t pm_state_show(struct device *dev, struct device_attribute *attr, char *buf)
{ … }
static ssize_t pm_state_store(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
{ … }
static DEVICE_ATTR_RW(pm_state);
static ssize_t modalias_show(struct device *dev, struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(modalias);
static ssize_t allow_func_id_match_store(struct device *dev,
struct device_attribute *attr, const char *buf, size_t count)
{ … }
static DEVICE_ATTR_WO(allow_func_id_match);
static struct attribute *pcmcia_dev_attrs[] = …;
ATTRIBUTE_GROUPS(…);
static int pcmcia_dev_suspend(struct device *dev)
{ … }
static int pcmcia_dev_resume(struct device *dev)
{ … }
static int pcmcia_bus_suspend_callback(struct device *dev, void *_data)
{ … }
static int pcmcia_bus_resume_callback(struct device *dev, void *_data)
{ … }
static int pcmcia_bus_resume(struct pcmcia_socket *skt)
{ … }
static int pcmcia_bus_suspend(struct pcmcia_socket *skt)
{ … }
static int pcmcia_bus_remove(struct pcmcia_socket *skt)
{ … }
static int pcmcia_bus_add(struct pcmcia_socket *skt)
{ … }
static int pcmcia_bus_early_resume(struct pcmcia_socket *skt)
{ … }
struct pcmcia_device *pcmcia_dev_present(struct pcmcia_device *_p_dev)
{ … }
EXPORT_SYMBOL(…);
static struct pcmcia_callback pcmcia_bus_callback = …;
static int pcmcia_bus_add_socket(struct device *dev)
{ … }
static void pcmcia_bus_remove_socket(struct device *dev)
{ … }
static struct class_interface pcmcia_bus_interface __refdata = …;
static const struct dev_pm_ops pcmcia_bus_pm_ops = …;
const struct bus_type pcmcia_bus_type = …;
static int __init init_pcmcia_bus(void)
{ … }
fs_initcall(init_pcmcia_bus);
static void __exit exit_pcmcia_bus(void)
{ … }
module_exit(exit_pcmcia_bus);
MODULE_ALIAS(…) …;