diff options
Diffstat (limited to 'drivers/char/drm/drm_bufs.c')
-rw-r--r-- | drivers/char/drm/drm_bufs.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/drivers/char/drm/drm_bufs.c b/drivers/char/drm/drm_bufs.c index d1e0b106c261..b70802035d9e 100644 --- a/drivers/char/drm/drm_bufs.c +++ b/drivers/char/drm/drm_bufs.c | |||
@@ -1499,34 +1499,18 @@ int drm_mapbufs( struct inode *inode, struct file *filp, | |||
1499 | goto done; | 1499 | goto done; |
1500 | } | 1500 | } |
1501 | 1501 | ||
1502 | #if LINUX_VERSION_CODE <= 0x020402 | ||
1503 | down( ¤t->mm->mmap_sem ); | ||
1504 | #else | ||
1505 | down_write( ¤t->mm->mmap_sem ); | 1502 | down_write( ¤t->mm->mmap_sem ); |
1506 | #endif | ||
1507 | virtual = do_mmap( filp, 0, map->size, | 1503 | virtual = do_mmap( filp, 0, map->size, |
1508 | PROT_READ | PROT_WRITE, | 1504 | PROT_READ | PROT_WRITE, |
1509 | MAP_SHARED, | 1505 | MAP_SHARED, |
1510 | token ); | 1506 | token ); |
1511 | #if LINUX_VERSION_CODE <= 0x020402 | ||
1512 | up( ¤t->mm->mmap_sem ); | ||
1513 | #else | ||
1514 | up_write( ¤t->mm->mmap_sem ); | 1507 | up_write( ¤t->mm->mmap_sem ); |
1515 | #endif | ||
1516 | } else { | 1508 | } else { |
1517 | #if LINUX_VERSION_CODE <= 0x020402 | ||
1518 | down( ¤t->mm->mmap_sem ); | ||
1519 | #else | ||
1520 | down_write( ¤t->mm->mmap_sem ); | 1509 | down_write( ¤t->mm->mmap_sem ); |
1521 | #endif | ||
1522 | virtual = do_mmap( filp, 0, dma->byte_count, | 1510 | virtual = do_mmap( filp, 0, dma->byte_count, |
1523 | PROT_READ | PROT_WRITE, | 1511 | PROT_READ | PROT_WRITE, |
1524 | MAP_SHARED, 0 ); | 1512 | MAP_SHARED, 0 ); |
1525 | #if LINUX_VERSION_CODE <= 0x020402 | ||
1526 | up( ¤t->mm->mmap_sem ); | ||
1527 | #else | ||
1528 | up_write( ¤t->mm->mmap_sem ); | 1513 | up_write( ¤t->mm->mmap_sem ); |
1529 | #endif | ||
1530 | } | 1514 | } |
1531 | if ( virtual > -1024UL ) { | 1515 | if ( virtual > -1024UL ) { |
1532 | /* Real error */ | 1516 | /* Real error */ |