From: bvassche Date: Sat, 19 Sep 2009 16:40:01 +0000 (+0000) Subject: Applied a modified version of OFED commit http://www.openfabrics.org/git/?p=ofed_1_5... X-Git-Url: http://git.etherboot.org/mirror/scst/.git/commitdiff_plain/54c13fe84e4fa2cdf0f37149759508dcac014603?hp=ac0ba4c97904509b535ef1d78762970599121cfc Applied a modified version of OFED commit openfabrics.org/git/?p=ofed_1_5/linux-2.6.git;a=commitdiff;h=6b20b3fb9b51722f382d6bfe333ec5bb5c216e9f. The OFED commit made a.o. ib_srpt.c compile on 2.6.30 and later kernels. Although the SCST ib_srpt.c code already compiles on a 2.6.30 kernel, this commit has been ported to SCST because the source code of the OFED implementation is cleaner. This commit does not change any functionality of SCST's SRPT. git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@1117 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- diff --git a/srpt/src/ib_srpt.c b/srpt/src/ib_srpt.c index 105cad4..d0efe04 100644 --- a/srpt/src/ib_srpt.c +++ b/srpt/src/ib_srpt.c @@ -2740,9 +2740,7 @@ static void srpt_add_one(struct ib_device *device) #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 30) snprintf(sdev->dev.bus_id, BUS_ID_SIZE, "srpt-%s", device->name); #else - snprintf(sdev->init_name, sizeof(sdev->init_name), - "srpt-%s", device->name); - sdev->dev.init_name = sdev->init_name; + dev_set_name(&sdev->dev, "srpt-%s", device->name); #endif #endif