Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mmc: wbsd: Use new tasklet API

This converts the driver to use the new tasklet API introduced in
commit 12cc923f1ccc ("tasklet: Introduce new initialization API")

Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
Link: https://lore.kernel.org/r/20210204151847.91353-10-kernel@esmil.dk
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

authored by

Emil Renner Berthing and committed by
Ulf Hansson
0c1a3e8b e821afd8

+15 -20
+15 -20
drivers/mmc/host/wbsd.c
··· 987 987 return host->mrq->cmd->data; 988 988 } 989 989 990 - static void wbsd_tasklet_card(unsigned long param) 990 + static void wbsd_tasklet_card(struct tasklet_struct *t) 991 991 { 992 - struct wbsd_host *host = (struct wbsd_host *)param; 992 + struct wbsd_host *host = from_tasklet(host, t, card_tasklet); 993 993 u8 csr; 994 994 int delay = -1; 995 995 ··· 1036 1036 mmc_detect_change(host->mmc, msecs_to_jiffies(delay)); 1037 1037 } 1038 1038 1039 - static void wbsd_tasklet_fifo(unsigned long param) 1039 + static void wbsd_tasklet_fifo(struct tasklet_struct *t) 1040 1040 { 1041 - struct wbsd_host *host = (struct wbsd_host *)param; 1041 + struct wbsd_host *host = from_tasklet(host, t, fifo_tasklet); 1042 1042 struct mmc_data *data; 1043 1043 1044 1044 spin_lock(&host->lock); ··· 1067 1067 spin_unlock(&host->lock); 1068 1068 } 1069 1069 1070 - static void wbsd_tasklet_crc(unsigned long param) 1070 + static void wbsd_tasklet_crc(struct tasklet_struct *t) 1071 1071 { 1072 - struct wbsd_host *host = (struct wbsd_host *)param; 1072 + struct wbsd_host *host = from_tasklet(host, t, crc_tasklet); 1073 1073 struct mmc_data *data; 1074 1074 1075 1075 spin_lock(&host->lock); ··· 1091 1091 spin_unlock(&host->lock); 1092 1092 } 1093 1093 1094 - static void wbsd_tasklet_timeout(unsigned long param) 1094 + static void wbsd_tasklet_timeout(struct tasklet_struct *t) 1095 1095 { 1096 - struct wbsd_host *host = (struct wbsd_host *)param; 1096 + struct wbsd_host *host = from_tasklet(host, t, timeout_tasklet); 1097 1097 struct mmc_data *data; 1098 1098 1099 1099 spin_lock(&host->lock); ··· 1115 1115 spin_unlock(&host->lock); 1116 1116 } 1117 1117 1118 - static void wbsd_tasklet_finish(unsigned long param) 1118 + static void wbsd_tasklet_finish(struct tasklet_struct *t) 1119 1119 { 1120 - struct wbsd_host *host = (struct wbsd_host *)param; 1120 + struct wbsd_host *host = from_tasklet(host, t, finish_tasklet); 1121 1121 struct mmc_data *data; 1122 1122 1123 1123 spin_lock(&host->lock); ··· 1449 1449 /* 1450 1450 * Set up tasklets. Must be done before requesting interrupt. 1451 1451 */ 1452 - tasklet_init(&host->card_tasklet, wbsd_tasklet_card, 1453 - (unsigned long)host); 1454 - tasklet_init(&host->fifo_tasklet, wbsd_tasklet_fifo, 1455 - (unsigned long)host); 1456 - tasklet_init(&host->crc_tasklet, wbsd_tasklet_crc, 1457 - (unsigned long)host); 1458 - tasklet_init(&host->timeout_tasklet, wbsd_tasklet_timeout, 1459 - (unsigned long)host); 1460 - tasklet_init(&host->finish_tasklet, wbsd_tasklet_finish, 1461 - (unsigned long)host); 1452 + tasklet_setup(&host->card_tasklet, wbsd_tasklet_card); 1453 + tasklet_setup(&host->fifo_tasklet, wbsd_tasklet_fifo); 1454 + tasklet_setup(&host->crc_tasklet, wbsd_tasklet_crc); 1455 + tasklet_setup(&host->timeout_tasklet, wbsd_tasklet_timeout); 1456 + tasklet_setup(&host->finish_tasklet, wbsd_tasklet_finish); 1462 1457 1463 1458 /* 1464 1459 * Allocate interrupt.