net2272.c (e5451c8f8330e03ad3cfa16048b4daf961af434f) | net2272.c (872ce5119524f33fafacc4d9610a431185ea66a2) |
---|---|
1/* 2 * Driver for PLX NET2272 USB device controller 3 * 4 * Copyright (C) 2005-2006 PLX Technology, Inc. 5 * Copyright (C) 2006-2011 Analog Devices, Inc. 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by --- 315 unchanged lines hidden (view full) --- 324 return 0; 325} 326 327/*---------------------------------------------------------------------------*/ 328 329static struct usb_request * 330net2272_alloc_request(struct usb_ep *_ep, gfp_t gfp_flags) 331{ | 1/* 2 * Driver for PLX NET2272 USB device controller 3 * 4 * Copyright (C) 2005-2006 PLX Technology, Inc. 5 * Copyright (C) 2006-2011 Analog Devices, Inc. 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by --- 315 unchanged lines hidden (view full) --- 324 return 0; 325} 326 327/*---------------------------------------------------------------------------*/ 328 329static struct usb_request * 330net2272_alloc_request(struct usb_ep *_ep, gfp_t gfp_flags) 331{ |
332 struct net2272_ep *ep; | |
333 struct net2272_request *req; 334 335 if (!_ep) 336 return NULL; | 332 struct net2272_request *req; 333 334 if (!_ep) 335 return NULL; |
337 ep = container_of(_ep, struct net2272_ep, ep); | |
338 339 req = kzalloc(sizeof(*req), gfp_flags); 340 if (!req) 341 return NULL; 342 343 INIT_LIST_HEAD(&req->queue); 344 345 return &req->req; 346} 347 348static void 349net2272_free_request(struct usb_ep *_ep, struct usb_request *_req) 350{ | 336 337 req = kzalloc(sizeof(*req), gfp_flags); 338 if (!req) 339 return NULL; 340 341 INIT_LIST_HEAD(&req->queue); 342 343 return &req->req; 344} 345 346static void 347net2272_free_request(struct usb_ep *_ep, struct usb_request *_req) 348{ |
351 struct net2272_ep *ep; | |
352 struct net2272_request *req; 353 | 349 struct net2272_request *req; 350 |
354 ep = container_of(_ep, struct net2272_ep, ep); | |
355 if (!_ep || !_req) 356 return; 357 358 req = container_of(_req, struct net2272_request, req); 359 WARN_ON(!list_empty(&req->queue)); 360 kfree(req); 361} 362 --- 2365 unchanged lines hidden --- | 351 if (!_ep || !_req) 352 return; 353 354 req = container_of(_req, struct net2272_request, req); 355 WARN_ON(!list_empty(&req->queue)); 356 kfree(req); 357} 358 --- 2365 unchanged lines hidden --- |