From 010750bf7c7c29ae848d8b53ac6bfdb167d4c3cc Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 14 Jun 2009 07:45:12 +0000 Subject: [PATCH] Ported to 2.6.30 kernel. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@898 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- srpt/src/ib_srpt.c | 6 ++++++ srpt/src/ib_srpt.h | 3 +++ 2 files changed, 9 insertions(+) diff --git a/srpt/src/ib_srpt.c b/srpt/src/ib_srpt.c index 6ca7d8bfd..bf8e550c5 100644 --- a/srpt/src/ib_srpt.c +++ b/srpt/src/ib_srpt.c @@ -2357,7 +2357,13 @@ static void srpt_add_one(struct ib_device *device) #else sdev->dev.class = &srpt_class; sdev->dev.parent = device->dma_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; +#endif #endif #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) diff --git a/srpt/src/ib_srpt.h b/srpt/src/ib_srpt.h index 2212769e3..6a135e8c7 100644 --- a/srpt/src/ib_srpt.h +++ b/srpt/src/ib_srpt.h @@ -205,6 +205,9 @@ struct srpt_device { #else struct device dev; #endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30) + char init_name[20]; +#endif struct scst_tgt *scst_tgt; };