今天做移植的时候,随手记录一下,今天所遇到的问题解决方法。
在linux2.6.34和之前的代码中还可以使用usb_buffer_alloc 和 usb_buffer_free 这两个函数,在2.6.35和之后的内核中
usb_buffer_alloc 和 usb_buffer_free这两个函数已不在使用了,可以用usb_alloc_coherent 和 usb_free_coherent代替。把驱动里分配内存与释放内存释放函数修改就好了。
这是rename的patch:
USB: rename usb_buffer_alloc() and usb_buffer_free()
For more clearance what the functions actually do,
usb_buffer_alloc() is renamed to usb_alloc_coherent()
usb_buffer_free() is renamed to usb_free_coherent()
They should only be used in code which really needs DMA coherency.
[added compatibility macros so we can convert things easier - gregkh]
Signed-off-by: Daniel Mack <[email protected]>
Cc: Alan Stern <[email protected]>
Cc: Pedro Ribeiro <[email protected]>
Signed-off-by: Greg Kroah-Hartman <gregk