int i;
unsigned long flags;
struct prov_record *ptr;
+ struct prov_record *tmp;
info->CardReady = 0;
info->ProgConStat = 0;
/* del_timer(&poll_timer); */
/* Make sure we free any memory reserve for provisioning */
- while (list_empty(&info->prov_list) == 0) {
+ list_for_each_entry_safe(ptr, tmp, &info->prov_list, list) {
pr_debug("deleting provisioning record\n");
- ptr = list_entry(info->prov_list.next, struct prov_record, list);
list_del(&ptr->list);
kfree(ptr->pprov_data);
kfree(ptr);
{
struct ft1000_info *info = netdev_priv(dev);
struct prov_record *ptr;
+ struct prov_record *tmp;
/* int cnt; */
info->CardReady = 0;
ft1000_disable_interrupts(dev);
/* Make sure we free any memory reserve for provisioning */
- while (list_empty(&info->prov_list) == 0) {
- ptr = list_entry(info->prov_list.next, struct prov_record, list);
+ list_for_each_entry_safe(ptr, tmp, &info->prov_list, list) {
list_del(&ptr->list);
kfree(ptr->pprov_data);
kfree(ptr);
struct ft1000_usb *ft1000dev;
int i;
struct dpram_blk *pdpram_blk;
+ struct dpram_blk *tmp;
dev = file->private_data;
info = netdev_priv(dev);
if (i == MAX_NUM_APP)
return 0;
- while (list_empty(&ft1000dev->app_info[i].app_sqlist) == 0) {
+ list_for_each_entry_safe(pdpram_blk, tmp, &ft1000dev->app_info[i].app_sqlist, list) {
pr_debug("Remove and free memory queue up on slow queue\n");
- pdpram_blk = list_entry(ft1000dev->app_info[i].app_sqlist.next, struct dpram_blk, list);
list_del(&pdpram_blk->list);
ft1000_free_buffer(pdpram_blk, &freercvpool);
}
struct ft1000_usb *ft1000dev = info->priv;
u16 tempword;
struct prov_record *ptr;
+ struct prov_record *tmp;
ft1000dev->fCondResetPend = true;
info->CardReady = 0;
ft1000dev->fProvComplete = false;
/* Make sure we free any memory reserve for provisioning */
- while (list_empty(&info->prov_list) == 0) {
+ list_for_each_entry_safe(ptr, tmp, &info->prov_list, list) {
pr_debug("deleting provisioning record\n");
- ptr =
- list_entry(info->prov_list.next, struct prov_record, list);
list_del(&ptr->list);
kfree(ptr->pprov_data);
kfree(ptr);