diff options
author | Moritz Muehlenhoff <jmm@debian.org> | 2009-07-21 01:22:08 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-09-15 12:01:49 -0700 |
commit | c18b5aed9d8c37db5e5835eb7d25f99f62a7f06a (patch) | |
tree | 85b8e4608250af15eab49ad57a216ad8ccceb40a /drivers/staging/hv/blkvsc_drv.c | |
parent | d4923090c1591f12d8f65e9d15a7ce2b63be2e87 (diff) |
Staging: hv: Remove compatibility ifdefry
Signed-off-by: Moritz Muehlenhoff <jmm@debian.org>
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/hv/blkvsc_drv.c')
-rw-r--r-- | drivers/staging/hv/blkvsc_drv.c | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/drivers/staging/hv/blkvsc_drv.c b/drivers/staging/hv/blkvsc_drv.c index bd33582af62..d90265370ab 100644 --- a/drivers/staging/hv/blkvsc_drv.c +++ b/drivers/staging/hv/blkvsc_drv.c @@ -20,8 +20,6 @@ * */ -#define KERNEL_2_6_27 - #include <linux/init.h> #include <linux/module.h> #include <linux/device.h> @@ -186,14 +184,9 @@ int blkvsc_drv_init(PFN_DRIVERINITIALIZE pfn_drv_init) drv_ctx->driver.name = storvsc_drv_obj->Base.name; memcpy(&drv_ctx->class_id, &storvsc_drv_obj->Base.deviceType, sizeof(GUID)); -#if defined(KERNEL_2_6_5) || defined(KERNEL_2_6_9) - drv_ctx->driver.probe = blkvsc_probe; - drv_ctx->driver.remove = blkvsc_remove; -#else drv_ctx->probe = blkvsc_probe; drv_ctx->remove = blkvsc_remove; drv_ctx->shutdown = blkvsc_shutdown; -#endif // The driver belongs to vmbus vmbus_child_driver_register(drv_ctx); @@ -225,16 +218,6 @@ void blkvsc_drv_exit(void) struct device *current_dev=NULL; -#if defined(KERNEL_2_6_5) || defined(KERNEL_2_6_9) -#define driver_for_each_device(drv, start, data, fn) \ - struct list_head *ptr, *n; \ - list_for_each_safe(ptr, n, &((drv)->devices)) {\ - struct device *curr_dev;\ - curr_dev = list_entry(ptr, struct device, driver_list);\ - fn(curr_dev, data);\ - } -#endif // KERNEL_2_6_9 - DPRINT_ENTER(BLKVSC_DRV); while (1) @@ -313,15 +296,9 @@ static int blkvsc_probe(struct device *device) ASSERT(sizeof(struct blkvsc_request_group) <= sizeof(struct blkvsc_request)); -#ifdef KERNEL_2_6_27 blkdev->request_pool = kmem_cache_create(dev_name(&device_ctx->device), sizeof(struct blkvsc_request) + storvsc_drv_obj->RequestExtSize, 0, SLAB_HWCACHE_ALIGN, NULL); -#else - blkdev->request_pool = kmem_cache_create(device_ctx->device.bus_id, - sizeof(struct blkvsc_request) + storvsc_drv_obj->RequestExtSize, 0, - SLAB_HWCACHE_ALIGN, NULL, NULL); -#endif if (!blkdev->request_pool) { ret = -ENOMEM; @@ -1170,7 +1147,6 @@ static void blkvsc_request_completion(STORVSC_REQUEST* request) list_del(&comp_req->req_entry); -#ifdef KERNEL_2_6_27 if (!__blk_end_request( comp_req->req, (!comp_req->request.Status ? 0: -EIO), @@ -1180,17 +1156,6 @@ static void blkvsc_request_completion(STORVSC_REQUEST* request) DPRINT_DBG(BLKVSC_DRV, "req %p COMPLETED\n", comp_req->req); kmem_cache_free(blkdev->request_pool, comp_req->group); } -#else - if (!end_that_request_first(comp_req->req, !comp_req->request.Status, (comp_req->sector_count * (blkdev->sector_size >> 9)))) - { - //All the sectors have been xferred ie the request is done - DPRINT_DBG(BLKVSC_DRV, "req %p COMPLETED\n", comp_req->req); - - end_that_request_last(comp_req->req, !comp_req->request.Status); - - kmem_cache_free(blkdev->request_pool, comp_req->group); - } -#endif kmem_cache_free(blkdev->request_pool, comp_req); } @@ -1234,14 +1199,10 @@ static int blkvsc_cancel_pending_reqs(struct block_device_context *blkdev) if (comp_req->req) { -#ifdef KERNEL_2_6_27 ret = __blk_end_request( comp_req->req, (!comp_req->request.Status ? 0 : -EIO), comp_req->sector_count * blkdev->sector_size); -#else - ret = end_that_request_first(comp_req->req, !comp_req->request.Status, (comp_req->sector_count * (blkdev->sector_size >> 9))); -#endif ASSERT(ret != 0); } @@ -1256,7 +1217,6 @@ static int blkvsc_cancel_pending_reqs(struct block_device_context *blkdev) if (comp_req->req) { -#ifdef KERNEL_2_6_27 if (!__blk_end_request( pend_req->req, -EIO, @@ -1266,17 +1226,6 @@ static int blkvsc_cancel_pending_reqs(struct block_device_context *blkdev) DPRINT_DBG(BLKVSC_DRV, "blkvsc_cancel_pending_reqs() - req %p COMPLETED\n", pend_req->req); kmem_cache_free(blkdev->request_pool, pend_req->group); } -#else - if (!end_that_request_first(pend_req->req, 0, (pend_req->sector_count * (blkdev->sector_size >> 9)))) - { - //All the sectors have been xferred ie the request is done - DPRINT_DBG(BLKVSC_DRV, "blkvsc_cancel_pending_reqs() - req %p COMPLETED\n", pend_req->req); - - end_that_request_last(pend_req->req, 0); - - kmem_cache_free(blkdev->request_pool, pend_req->group); - } -#endif } kmem_cache_free(blkdev->request_pool, pend_req); |