History

spi: use kthread_create_worker() helper

Use kthread_create_worker() helper to simplify the code. It uses the kthread worker API the right way. It will eventually allow to remove the FIXME in kthread_worker_fn() and add more consistency checks in the future.

Marek Szyprowski committed 6 years ago

Commit 60a883d1 parent 0e801d52 files · +14 −18Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/spi/spi.h+2−4
@@ -358,8 +358,7 @@ static inline void spi_unregister_driver(struct spi_driver *sdrv) · 357 unmodified lines
358358 * @cleanup: frees controller-specific state
359359 * @can_dma: determine whether this controller supports DMA
360360 * @queued: whether this controller is providing an internal message queue
361− * @kworker: thread struct for message pump
362− * @kworker_task: pointer to task for message pump kworker thread
361+ * @kworker: pointer to thread struct for message pump
363362 * @pump_messages: work struct for scheduling work to the message pump
364363 * @queue_lock: spinlock to syncronise access to message queue
365364 * @queue: message queue
@@ -593,8 +592,7 @@ struct spi_controller { · 227 unmodified lines
593592 * Over time we expect SPI drivers to be phased over to this API.
594593 */
595594 bool queued;
596− struct kthread_worker kworker;
597− struct task_struct *kworker_task;
595+ struct kthread_worker *kworker;
598596 struct kthread_work pump_messages;
599597 spinlock_t queue_lock;
600598 struct list_head queue;