aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2009-05-04 15:40:54 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-06-16 00:30:27 -0400
commitf899c2ddd45f2515deb446e2b143e4a686a49aee (patch)
tree2f50d957178337e04385162dc8ff9ce1419dc6bc /drivers/infiniband
parent559fde706873256903155b3a62b05d0f52d62ab9 (diff)
infiniband: ehca: 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: Sean Hefty <sean.hefty@intel.com> Cc: Roland Dreier <rolandd@cisco.com> Cc: Hal Rosenstock <hal.rosenstock@gmail.com> Cc: general@lists.openfabrics.org Cc: Christoph Raisch <raisch@de.ibm.com> Acked-by: Hoang-Nam Nguyen <hnguyen@de.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/hw/ehca/ehca_main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/ehca/ehca_main.c b/drivers/infiniband/hw/ehca/ehca_main.c
index 85905ab9391f..ce4e6eff4792 100644
--- a/drivers/infiniband/hw/ehca/ehca_main.c
+++ b/drivers/infiniband/hw/ehca/ehca_main.c
@@ -636,7 +636,7 @@ static ssize_t ehca_show_##name(struct device *dev, \
636 struct hipz_query_hca *rblock; \ 636 struct hipz_query_hca *rblock; \
637 int data; \ 637 int data; \
638 \ 638 \
639 shca = dev->driver_data; \ 639 shca = dev_get_drvdata(dev); \
640 \ 640 \
641 rblock = ehca_alloc_fw_ctrlblock(GFP_KERNEL); \ 641 rblock = ehca_alloc_fw_ctrlblock(GFP_KERNEL); \
642 if (!rblock) { \ 642 if (!rblock) { \
@@ -680,7 +680,7 @@ static ssize_t ehca_show_adapter_handle(struct device *dev,
680 struct device_attribute *attr, 680 struct device_attribute *attr,
681 char *buf) 681 char *buf)
682{ 682{
683 struct ehca_shca *shca = dev->driver_data; 683 struct ehca_shca *shca = dev_get_drvdata(dev);
684 684
685 return sprintf(buf, "%llx\n", shca->ipz_hca_handle.handle); 685 return sprintf(buf, "%llx\n", shca->ipz_hca_handle.handle);
686 686
@@ -749,7 +749,7 @@ static int __devinit ehca_probe(struct of_device *dev,
749 749
750 shca->ofdev = dev; 750 shca->ofdev = dev;
751 shca->ipz_hca_handle.handle = *handle; 751 shca->ipz_hca_handle.handle = *handle;
752 dev->dev.driver_data = shca; 752 dev_set_drvdata(&dev->dev, shca);
753 753
754 ret = ehca_sense_attributes(shca); 754 ret = ehca_sense_attributes(shca);
755 if (ret < 0) { 755 if (ret < 0) {
@@ -878,7 +878,7 @@ probe1:
878 878
879static int __devexit ehca_remove(struct of_device *dev) 879static int __devexit ehca_remove(struct of_device *dev)
880{ 880{
881 struct ehca_shca *shca = dev->dev.driver_data; 881 struct ehca_shca *shca = dev_get_drvdata(&dev->dev);
882 unsigned long flags; 882 unsigned long flags;
883 int ret; 883 int ret;
884 884