error in f_mass_storage.c while merging USB gadget changes...

As i know the bus_id structure element is nomore used in 2.6.30
kernel. So I made the corrections while merging the USB gadget changes
in f_mass_storage.c. following are the changes made for the same:

- snprintf(curlun->dev.bus_id, BUS_ID_SIZE, "lun%d", i);
+ snprintf(dev_name(&curlun->dev), BUS_ID_SIZE, "lun%d", i);

Now when i boot this kernel image i am getting the following kernel
panic. can anybody help me to solve the same.

Kernel Logs:
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
android init
android_bind
android_bind_config
mass_storage_function_add
Unable to handle kernel NULL pointer dereference at virtual address
00000000
pgd = c0004000
[00000000] *pgd=00000000
Internal error: Oops: 805 [#1]
Modules linked in:
CPU: 0 Not tainted (2.6.30-omap1 #16)
PC is at memcpy+0xcc/0x330
LR is at vsnprintf+0x560/0xd4c
pc : [<c016170c>] lr : [<c01683b4>] psr: a0000013
sp : c7817cb4 ip : 0000006e fp : c03bee04
r10: 00000000 r9 : c7817e84 r8 : 00000014
r7 : c7908000 r6 : c7949e08 r5 : c034def8 r4 : 00000075
r3 : 0000006c r2 : 80000000 r1 : c034defb r0 : 00000000
Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel
Control: 10c5387d Table: 80004019 DAC: 00000017
Process swapper (pid: 1, stack limit = 0xc78162e0)
Stack: (0xc7817cb4 to 0xc7818000)
7ca0: 00000000 00000003
c01683b4
7cc0: c7812cf0 c039f1e0 c7817cdc c0043298 c7812cf0 c039f1e0 c039f1e0
00000014
7ce0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000
c034defb
7d00: 00000000 c005ff9c c782601c c7812cc0 00000017 c781ccc0 c7812e58
c0060020
7d20: 00000000 00000002 c7826000 c0027ca0 c7816000 7fffffff 7fffffff
c7816000
7d40: c7816000 7fffffff c7817d5c c029e67c c7817da0 7fffffff c7817dc4
c029e820
7d60: 00000001 c78018c8 c7817d9c c005c544 c7827fbc c00436a0 00000000
60000093
7d80: c7817da0 c7812cc0 7fffffff c029e2a4 00000000 00000001 c7812cc0
c0044e58
7da0: 00100100 00200200 c79dc420 00000000 c7817dcc 00000000 c79dc420
fffffffe
7dc0: c7817dcc c0058880 c79dc420 00000000 c7817dd0 c7817dd0 c791c000
00000010
7de0: 00000010 fffffffe 00000001 c7817e24 000000d0 fffffffd 00000000
c7803720
7e00: 00000001 00000000 00000000 c03cf630 00000000 00000000 c7817e6c
c0162cc8
7e20: c78d34d0 c780c7a8 00000000 c029ec90 c78d34e0 c78d33e0 c00d7384
c79ceb18
7e40: c7817e88 c034defb c7817e88 c7949de0 c7908000 c7949e08 c7908000
00000000
7e60: 00000000 c79dc520 c03bee04 c0168c24 00000000 c7817e84 c034def8
c001c174
7e80: c034def8 00000000 c03bee04 c7908000 c03bee2c c7908000 c03bee04
c790804c
7ea0: c7908000 00000000 00000000 c03d925c c034dbe7 c001b1b8 00000000
c79080b8
7ec0: c790804c c001c038 c03bee04 00000000 00000000 c78f2540 c03bee04
c79dc520
7ee0: 00000000 c78f2540 00000000 c001b664 00000000 c001b48c c03bee04
c79dc520
7f00: c79dc520 c001b2f4 c03bedd0 c79dc520 c79dc520 c7828d58 c78f2540
c001b544
7f20: c03d9234 c79dc520 c7828d58 c03a9e04 00000000 c001b9f4 c03bee78
c78280d8
7f40: c7828d58 00000000 00000000 c01f5608 c03bee78 c03beec8 c034db00
00000000
7f60: c0022558 c03c5220 00000000 c001b6cc c0022818 c0027280 00000000
c00d1ee0
7f80: c7817fac c0325cf1 00008100 0000024e c03a8434 c783d0a0 c03a8434
0000015f
7fa0: c03cd33c c00d2134 c0325cf1 c783e680 c7817fbe c0071788 c0022558
35330f60
7fc0: 00000031 00000000 c0022818 c0022558 00000000 00000000 00000000
00000000
7fe0: 00000000 c00086a4 00000000 00000000 00000000 c004d080 406fec08
2173df00
[<c016170c>] (memcpy+0xcc/0x330) from [<00000000>] (0x0)
Code: e1b02f82 14d13001 24d14001 24d1c001 (14c03001)
---[ end trace e82469addedccbae ]---
Kernel panic - not syncing: Attempted to kill init!