|
@@ -59,7 +59,7 @@ int fw_csr_iterator_next(struct fw_csr_iterator *ci, int *key, int *value)
|
|
}
|
|
}
|
|
EXPORT_SYMBOL(fw_csr_iterator_next);
|
|
EXPORT_SYMBOL(fw_csr_iterator_next);
|
|
|
|
|
|
-static int is_fw_unit(struct device *dev);
|
|
|
|
|
|
+static bool is_fw_unit(struct device *dev);
|
|
|
|
|
|
static int match_unit_directory(u32 *directory, u32 match_flags,
|
|
static int match_unit_directory(u32 *directory, u32 match_flags,
|
|
const struct ieee1394_device_id *id)
|
|
const struct ieee1394_device_id *id)
|
|
@@ -599,7 +599,7 @@ static struct device_type fw_unit_type = {
|
|
.release = fw_unit_release,
|
|
.release = fw_unit_release,
|
|
};
|
|
};
|
|
|
|
|
|
-static int is_fw_unit(struct device *dev)
|
|
|
|
|
|
+static bool is_fw_unit(struct device *dev)
|
|
{
|
|
{
|
|
return dev->type == &fw_unit_type;
|
|
return dev->type == &fw_unit_type;
|
|
}
|
|
}
|
|
@@ -749,6 +749,11 @@ static struct device_type fw_device_type = {
|
|
.release = fw_device_release,
|
|
.release = fw_device_release,
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+static bool is_fw_device(struct device *dev)
|
|
|
|
+{
|
|
|
|
+ return dev->type == &fw_device_type;
|
|
|
|
+}
|
|
|
|
+
|
|
static int update_unit(struct device *dev, void *data)
|
|
static int update_unit(struct device *dev, void *data)
|
|
{
|
|
{
|
|
struct fw_unit *unit = fw_unit(dev);
|
|
struct fw_unit *unit = fw_unit(dev);
|
|
@@ -785,6 +790,9 @@ static int lookup_existing_device(struct device *dev, void *data)
|
|
struct fw_card *card = new->card;
|
|
struct fw_card *card = new->card;
|
|
int match = 0;
|
|
int match = 0;
|
|
|
|
|
|
|
|
+ if (!is_fw_device(dev))
|
|
|
|
+ return 0;
|
|
|
|
+
|
|
down_read(&fw_device_rwsem); /* serialize config_rom access */
|
|
down_read(&fw_device_rwsem); /* serialize config_rom access */
|
|
spin_lock_irq(&card->lock); /* serialize node access */
|
|
spin_lock_irq(&card->lock); /* serialize node access */
|
|
|
|
|
|
@@ -824,7 +832,7 @@ static int lookup_existing_device(struct device *dev, void *data)
|
|
|
|
|
|
enum { BC_UNKNOWN = 0, BC_UNIMPLEMENTED, BC_IMPLEMENTED, };
|
|
enum { BC_UNKNOWN = 0, BC_UNIMPLEMENTED, BC_IMPLEMENTED, };
|
|
|
|
|
|
-void fw_device_set_broadcast_channel(struct fw_device *device, int generation)
|
|
|
|
|
|
+static void set_broadcast_channel(struct fw_device *device, int generation)
|
|
{
|
|
{
|
|
struct fw_card *card = device->card;
|
|
struct fw_card *card = device->card;
|
|
__be32 data;
|
|
__be32 data;
|
|
@@ -860,6 +868,14 @@ void fw_device_set_broadcast_channel(struct fw_device *device, int generation)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+int fw_device_set_broadcast_channel(struct device *dev, void *gen)
|
|
|
|
+{
|
|
|
|
+ if (is_fw_device(dev))
|
|
|
|
+ set_broadcast_channel(fw_device(dev), (long)gen);
|
|
|
|
+
|
|
|
|
+ return 0;
|
|
|
|
+}
|
|
|
|
+
|
|
static void fw_device_init(struct work_struct *work)
|
|
static void fw_device_init(struct work_struct *work)
|
|
{
|
|
{
|
|
struct fw_device *device =
|
|
struct fw_device *device =
|
|
@@ -958,7 +974,7 @@ static void fw_device_init(struct work_struct *work)
|
|
1 << device->max_speed);
|
|
1 << device->max_speed);
|
|
device->config_rom_retries = 0;
|
|
device->config_rom_retries = 0;
|
|
|
|
|
|
- fw_device_set_broadcast_channel(device, device->generation);
|
|
|
|
|
|
+ set_broadcast_channel(device, device->generation);
|
|
}
|
|
}
|
|
|
|
|
|
/*
|
|
/*
|