aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2009-04-30 17:43:31 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-06-16 00:30:26 -0400
commitd961450da5e16dae8da276c0a234764872b2307b (patch)
treeb91bab945c21060e9d687ac0472bf6cf0a44be01 /drivers/firewire
parent4b9d0d3b81ec0900971cbe8aba8ba0ae9c08a087 (diff)
firewire: remove driver_data direct access of struct device
In the near future, the driver core is going to not allow direct access to the driver_data pointer in struct device. Instead, the functions dev_get_drvdata() and dev_set_drvdata() should be used. These functions have been around since the beginning, so are backwards compatible with all older kernel versions. Cc: linux1394-devel@lists.sourceforge.net Acked-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Cc: Kristian Hoegsberg <krh@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/firewire')
-rw-r--r--drivers/firewire/fw-sbp2.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/firewire/fw-sbp2.c b/drivers/firewire/fw-sbp2.c
index 2bcf51557c72..a70e66e78c7b 100644
--- a/drivers/firewire/fw-sbp2.c
+++ b/drivers/firewire/fw-sbp2.c
@@ -1125,7 +1125,7 @@ static int sbp2_probe(struct device *dev)
1125 return -ENOMEM; 1125 return -ENOMEM;
1126 1126
1127 tgt = (struct sbp2_target *)shost->hostdata; 1127 tgt = (struct sbp2_target *)shost->hostdata;
1128 unit->device.driver_data = tgt; 1128 dev_set_drvdata(&unit->device, tgt);
1129 tgt->unit = unit; 1129 tgt->unit = unit;
1130 kref_init(&tgt->kref); 1130 kref_init(&tgt->kref);
1131 INIT_LIST_HEAD(&tgt->lu_list); 1131 INIT_LIST_HEAD(&tgt->lu_list);
@@ -1180,7 +1180,7 @@ static int sbp2_probe(struct device *dev)
1180static int sbp2_remove(struct device *dev) 1180static int sbp2_remove(struct device *dev)
1181{ 1181{
1182 struct fw_unit *unit = fw_unit(dev); 1182 struct fw_unit *unit = fw_unit(dev);
1183 struct sbp2_target *tgt = unit->device.driver_data; 1183 struct sbp2_target *tgt = dev_get_drvdata(&unit->device);
1184 1184
1185 sbp2_target_put(tgt); 1185 sbp2_target_put(tgt);
1186 return 0; 1186 return 0;
@@ -1240,7 +1240,7 @@ static void sbp2_reconnect(struct work_struct *work)
1240 1240
1241static void sbp2_update(struct fw_unit *unit) 1241static void sbp2_update(struct fw_unit *unit)
1242{ 1242{
1243 struct sbp2_target *tgt = unit->device.driver_data; 1243 struct sbp2_target *tgt = dev_get_drvdata(&unit->device);
1244 struct sbp2_logical_unit *lu; 1244 struct sbp2_logical_unit *lu;
1245 1245
1246 fw_device_enable_phys_dma(fw_device(unit->device.parent)); 1246 fw_device_enable_phys_dma(fw_device(unit->device.parent));