Hi, This patch looks fine to me. Thanks! Nam Greg Kroah-Hartman <gre...@suse.de> wrote on 04.05.2009 22:00:22:
> [image removed] > > [PATCH] infiniband: ehca: remove driver_data direct access of struct device > > Greg Kroah-Hartman > > to: > > Sean Hefty, Roland Dreier, Hal Rosenstock, Christoph Raisch, Hoang-Nam Nguyen > > 04.05.2009 22:05 > > Cc: > > general, Greg KH > > From: Greg Kroah-Hartman <gre...@suse.de> > > 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.he...@intel.com> > Cc: Roland Dreier <rola...@cisco.com> > Cc: Hal Rosenstock <hal.rosenst...@gmail.com> > Cc: general@lists.openfabrics.org > Cc: Christoph Raisch <rai...@de.ibm.com> > Cc: Hoang-Nam Nguyen <hngu...@de.ibm.com> > Signed-off-by: Greg Kroah-Hartman <gre...@suse.de> > > --- > drivers/infiniband/hw/ehca/ehca_main.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > --- 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 > struct hipz_query_hca *rblock; \ > int data; \ > \ > - shca = dev->driver_data; \ > + shca = dev_get_drvdata(dev); \ > \ > rblock = ehca_alloc_fw_ctrlblock(GFP_KERNEL); \ > if (!rblock) { \ > @@ -680,7 +680,7 @@ static ssize_t ehca_show_adapter_handle( > struct device_attribute *attr, > char *buf) > { > - struct ehca_shca *shca = dev->driver_data; > + struct ehca_shca *shca = dev_get_drvdata(dev); > > return sprintf(buf, "%llx\n", shca->ipz_hca_handle.handle); > > @@ -749,7 +749,7 @@ static int __devinit ehca_probe(struct o > > shca->ofdev = dev; > shca->ipz_hca_handle.handle = *handle; > - dev->dev.driver_data = shca; > + dev_set_drvdata(&dev->dev, shca); > > ret = ehca_sense_attributes(shca); > if (ret < 0) { > @@ -878,7 +878,7 @@ probe1: > > static int __devexit ehca_remove(struct of_device *dev) > { > - struct ehca_shca *shca = dev->dev.driver_data; > + struct ehca_shca *shca = dev_get_drvdata(&dev->dev); > unsigned long flags; > int ret; > _______________________________________________ general mailing list general@lists.openfabrics.org http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general