From 9381444e7df7f240f0c293064da8213d40ecb0f1 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sat, 19 Sep 2009 16:40:01 +0000 Subject: [PATCH] Applied a modified version of OFED commit http://www.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: http://svn.code.sf.net/p/scst/svn/trunk@1117 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- srpt/src/ib_srpt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/srpt/src/ib_srpt.c b/srpt/src/ib_srpt.c index 105cad436..d0efe044d 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