Commit cead1855 authored by Eric W. Biederman's avatar Eric W. Biederman
Browse files

exit: Rename complete_and_exit to kthread_complete_and_exit



Update complete_and_exit to call kthread_exit instead of do_exit.

Change the name to reflect this change in functionality.  All of the
users of complete_and_exit are causing the current kthread to exit so
this change makes it clear what is happening.

Move the implementation of kthread_complete_and_exit from
kernel/exit.c to to kernel/kthread.c.  As this function is kthread
specific it makes most sense to live with the kthread functions.

There are no functional change.

Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
parent ca3574bd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -63,7 +63,7 @@ static void rsi_coex_scheduler_thread(struct rsi_common *common)
		rsi_coex_sched_tx_pkts(coex_cb);
	} while (atomic_read(&coex_cb->coex_tx_thread.thread_done) == 0);

	complete_and_exit(&coex_cb->coex_tx_thread.completion, 0);
	kthread_complete_and_exit(&coex_cb->coex_tx_thread.completion, 0);
}

int rsi_coex_recv_pkt(struct rsi_common *common, u8 *msg)
+1 −1
Original line number Diff line number Diff line
@@ -260,7 +260,7 @@ static void rsi_tx_scheduler_thread(struct rsi_common *common)
		if (common->init_done)
			rsi_core_qos_processor(common);
	} while (atomic_read(&common->tx_thread.thread_done) == 0);
	complete_and_exit(&common->tx_thread.completion, 0);
	kthread_complete_and_exit(&common->tx_thread.completion, 0);
}

#ifdef CONFIG_RSI_COEX
+1 −1
Original line number Diff line number Diff line
@@ -75,7 +75,7 @@ void rsi_sdio_rx_thread(struct rsi_common *common)

	rsi_dbg(INFO_ZONE, "%s: Terminated SDIO RX thread\n", __func__);
	atomic_inc(&sdev->rx_thread.thread_done);
	complete_and_exit(&sdev->rx_thread.completion, 0);
	kthread_complete_and_exit(&sdev->rx_thread.completion, 0);
}

/**
+1 −1
Original line number Diff line number Diff line
@@ -56,6 +56,6 @@ void rsi_usb_rx_thread(struct rsi_common *common)
out:
	rsi_dbg(INFO_ZONE, "%s: Terminated thread\n", __func__);
	skb_queue_purge(&dev->rx_q);
	complete_and_exit(&dev->rx_thread.completion, 0);
	kthread_complete_and_exit(&dev->rx_thread.completion, 0);
}
+3 −3
Original line number Diff line number Diff line
@@ -160,7 +160,7 @@ static int pnp_dock_thread(void *unused)
			 * No dock to manage
			 */
		case PNP_FUNCTION_NOT_SUPPORTED:
			complete_and_exit(&unload_sem, 0);
			kthread_complete_and_exit(&unload_sem, 0);
		case PNP_SYSTEM_NOT_DOCKED:
			d = 0;
			break;
@@ -170,7 +170,7 @@ static int pnp_dock_thread(void *unused)
		default:
			pnpbios_print_status("pnp_dock_thread", status);
			printk(KERN_WARNING "PnPBIOS: disabling dock monitoring.\n");
			complete_and_exit(&unload_sem, 0);
			kthread_complete_and_exit(&unload_sem, 0);
		}
		if (d != docked) {
			if (pnp_dock_event(d, &now) == 0) {
@@ -183,7 +183,7 @@ static int pnp_dock_thread(void *unused)
			}
		}
	}
	complete_and_exit(&unload_sem, 0);
	kthread_complete_and_exit(&unload_sem, 0);
}

static int pnpbios_get_resources(struct pnp_dev *dev)
Loading