aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire/fw-device.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/firewire/fw-device.c')
-rw-r--r--drivers/firewire/fw-device.c40
1 files changed, 18 insertions, 22 deletions
diff --git a/drivers/firewire/fw-device.c b/drivers/firewire/fw-device.c
index 2de3dd5ebc4b..ac5043cc9ad0 100644
--- a/drivers/firewire/fw-device.c
+++ b/drivers/firewire/fw-device.c
@@ -134,8 +134,7 @@ static int get_modalias(struct fw_unit *unit, char *buffer, size_t buffer_size)
134 vendor, model, specifier_id, version); 134 vendor, model, specifier_id, version);
135} 135}
136 136
137static int 137static int fw_unit_uevent(struct device *dev, struct kobj_uevent_env *env)
138fw_unit_uevent(struct device *dev, struct kobj_uevent_env *env)
139{ 138{
140 struct fw_unit *unit = fw_unit(dev); 139 struct fw_unit *unit = fw_unit(dev);
141 char modalias[64]; 140 char modalias[64];
@@ -193,8 +192,8 @@ struct config_rom_attribute {
193 u32 key; 192 u32 key;
194}; 193};
195 194
196static ssize_t 195static ssize_t show_immediate(struct device *dev,
197show_immediate(struct device *dev, struct device_attribute *dattr, char *buf) 196 struct device_attribute *dattr, char *buf)
198{ 197{
199 struct config_rom_attribute *attr = 198 struct config_rom_attribute *attr =
200 container_of(dattr, struct config_rom_attribute, attr); 199 container_of(dattr, struct config_rom_attribute, attr);
@@ -225,8 +224,8 @@ show_immediate(struct device *dev, struct device_attribute *dattr, char *buf)
225#define IMMEDIATE_ATTR(name, key) \ 224#define IMMEDIATE_ATTR(name, key) \
226 { __ATTR(name, S_IRUGO, show_immediate, NULL), key } 225 { __ATTR(name, S_IRUGO, show_immediate, NULL), key }
227 226
228static ssize_t 227static ssize_t show_text_leaf(struct device *dev,
229show_text_leaf(struct device *dev, struct device_attribute *dattr, char *buf) 228 struct device_attribute *dattr, char *buf)
230{ 229{
231 struct config_rom_attribute *attr = 230 struct config_rom_attribute *attr =
232 container_of(dattr, struct config_rom_attribute, attr); 231 container_of(dattr, struct config_rom_attribute, attr);
@@ -295,10 +294,9 @@ static struct config_rom_attribute config_rom_attributes[] = {
295 TEXT_LEAF_ATTR(hardware_version_name, CSR_HARDWARE_VERSION), 294 TEXT_LEAF_ATTR(hardware_version_name, CSR_HARDWARE_VERSION),
296}; 295};
297 296
298static void 297static void init_fw_attribute_group(struct device *dev,
299init_fw_attribute_group(struct device *dev, 298 struct device_attribute *attrs,
300 struct device_attribute *attrs, 299 struct fw_attribute_group *group)
301 struct fw_attribute_group *group)
302{ 300{
303 struct device_attribute *attr; 301 struct device_attribute *attr;
304 int i, j; 302 int i, j;
@@ -321,9 +319,8 @@ init_fw_attribute_group(struct device *dev,
321 dev->groups = group->groups; 319 dev->groups = group->groups;
322} 320}
323 321
324static ssize_t 322static ssize_t modalias_show(struct device *dev,
325modalias_show(struct device *dev, 323 struct device_attribute *attr, char *buf)
326 struct device_attribute *attr, char *buf)
327{ 324{
328 struct fw_unit *unit = fw_unit(dev); 325 struct fw_unit *unit = fw_unit(dev);
329 int length; 326 int length;
@@ -334,9 +331,8 @@ modalias_show(struct device *dev,
334 return length + 1; 331 return length + 1;
335} 332}
336 333
337static ssize_t 334static ssize_t rom_index_show(struct device *dev,
338rom_index_show(struct device *dev, 335 struct device_attribute *attr, char *buf)
339 struct device_attribute *attr, char *buf)
340{ 336{
341 struct fw_device *device = fw_device(dev->parent); 337 struct fw_device *device = fw_device(dev->parent);
342 struct fw_unit *unit = fw_unit(dev); 338 struct fw_unit *unit = fw_unit(dev);
@@ -351,8 +347,8 @@ static struct device_attribute fw_unit_attributes[] = {
351 __ATTR_NULL, 347 __ATTR_NULL,
352}; 348};
353 349
354static ssize_t 350static ssize_t config_rom_show(struct device *dev,
355config_rom_show(struct device *dev, struct device_attribute *attr, char *buf) 351 struct device_attribute *attr, char *buf)
356{ 352{
357 struct fw_device *device = fw_device(dev); 353 struct fw_device *device = fw_device(dev);
358 size_t length; 354 size_t length;
@@ -365,8 +361,8 @@ config_rom_show(struct device *dev, struct device_attribute *attr, char *buf)
365 return length; 361 return length;
366} 362}
367 363
368static ssize_t 364static ssize_t guid_show(struct device *dev,
369guid_show(struct device *dev, struct device_attribute *attr, char *buf) 365 struct device_attribute *attr, char *buf)
370{ 366{
371 struct fw_device *device = fw_device(dev); 367 struct fw_device *device = fw_device(dev);
372 int ret; 368 int ret;
@@ -385,8 +381,8 @@ static struct device_attribute fw_device_attributes[] = {
385 __ATTR_NULL, 381 __ATTR_NULL,
386}; 382};
387 383
388static int 384static int read_rom(struct fw_device *device,
389read_rom(struct fw_device *device, int generation, int index, u32 *data) 385 int generation, int index, u32 *data)
390{ 386{
391 int rcode; 387 int rcode;
392 388