From a36f8a3a6ff59a2fc62aa8a2b4833da0507ae0ab Mon Sep 17 00:00:00 2001 From: David Cross Date: Fri, 10 Sep 2010 16:55:53 -0700 Subject: [PATCH] --- yaml --- r: 219851 b: refs/heads/master c: 4c404487aa3d26bf7a7e16f8545778385e06d839 h: refs/heads/master i: 219849: 86b40776a5e855a0a0d35c667c7bd55ca5ea4fea 219847: 49aa222e078a5d3e0d6f1edeb799434b738f629e v: v3 --- [refs] | 2 +- .../westbridge/astoria/gadget/cyasgadget.c | 42 ------------------- 2 files changed, 1 insertion(+), 43 deletions(-) diff --git a/[refs] b/[refs] index a4d3306a73b8..75e8698e5e5d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 72bbd9bce41276d06b6b816df21aced71b1896eb +refs/heads/master: 4c404487aa3d26bf7a7e16f8545778385e06d839 diff --git a/trunk/drivers/staging/westbridge/astoria/gadget/cyasgadget.c b/trunk/drivers/staging/westbridge/astoria/gadget/cyasgadget.c index 48080b39abec..756ff278f66d 100644 --- a/trunk/drivers/staging/westbridge/astoria/gadget/cyasgadget.c +++ b/trunk/drivers/staging/westbridge/astoria/gadget/cyasgadget.c @@ -1149,11 +1149,9 @@ static int cyasgadget_ioctl( struct inode *inode = mapping->host; struct inode *alloc_inode = file_to_allocate->f_path.dentry->d_inode; - int cluster = 0; uint32_t num_clusters = 0; struct buffer_head bh; struct kstat stat; - struct iattr alloc_iattr; int nr_pages = 0; int ret_stat = 0; @@ -1188,47 +1186,7 @@ static int cyasgadget_ioctl( /* block size is arbitrary , we'll use sector size*/ bh.b_size = SECTOR_SIZE ; - #ifndef WESTBRIDGE_NDEBUG - cy_as_hal_print_message("%s: getting fat blocks %d " - "size of %d\n", __func__, - num_clusters, bh.b_size); - #endif - for (cluster = 0; cluster < num_clusters; cluster++) { - ret_stat = fat_get_block(inode, - cluster, &bh, 1); - if (ret_stat) { - cy_as_hal_print_message( - "%s: unable to get fat block, " - "ret_stat=0x%d\n", - __func__, ret_stat); - goto initsoj_safe_exit; - } - } - #ifndef WESTBRIDGE_NDEBUG - cy_as_hal_print_message("%s: allocated clusters " - "successfully (fat_get_block), check bmap..." - "\n", __func__); - #endif - - alloc_iattr.ia_valid = ATTR_SIZE; - alloc_iattr.ia_size = k_d.num_bytes; - - #ifndef WESTBRIDGE_NDEBUG - cy_as_hal_print_message("%s: calling fat_notify_change " - "(ia_valid:%d, ia_size:%d)\n", __func__, - alloc_iattr.ia_valid, - (int)alloc_iattr.ia_size); - #endif - - /* adjust the filesize */ - ret_stat = alloc_inode->i_op->setattr( - file_to_allocate->f_path.dentry, &alloc_iattr); - #ifndef WESTBRIDGE_NDEBUG - cy_as_hal_print_message("%s: fat_setattr() " - "returned 0x%x\n", - __func__, ret_stat); - #endif /* clear dirty pages in page cache * (if were any allocated) */