14 #include <linux/kernel.h>
16 #include <linux/stat.h>
17 #include <linux/string.h>
23 #define zorro_config_attr(name, field, format_string) \
25 show_##name(struct device *dev, struct device_attribute *attr, char *buf) \
27 struct zorro_dev *z; \
29 z = to_zorro_dev(dev); \
30 return sprintf(buf, format_string, z->field); \
32 static DEVICE_ATTR(name, S_IRUGO, show_##name, NULL);
42 struct zorro_dev *z = to_zorro_dev(dev);
44 return sprintf(buf,
"0x%08lx 0x%08lx 0x%08lx\n",
45 (
unsigned long)zorro_resource_start(z),
46 (
unsigned long)zorro_resource_end(z),
47 zorro_resource_flags(z));
54 char *buf, loff_t off,
size_t count)
63 cd.cd_SlotAddr = z->slotaddr;
64 cd.cd_SlotSize = z->slotsize;
65 cd.cd_BoardAddr = (
void *)zorro_resource_start(z);
66 cd.cd_BoardSize = zorro_resource_len(z);
77 .
read = zorro_read_config,
83 struct zorro_dev *z = to_zorro_dev(dev);
92 struct device *dev = &z->dev;