[PRE-REVIEW,08/16] isdn: Prepare to use the new tasklet API
diff mbox series

Message ID 20190929163028.9665-9-romain.perier@gmail.com
State New
Headers show
  • Modernize the tasklet API
Related show

Commit Message

Romain Perier Sept. 29, 2019, 4:30 p.m. UTC
The future tasklet API will no longer allow to pass an arbitrary
"unsigned long" data parameter. The tasklet data structure will need to
be embedded into a data structure that will be retrieved from the tasklet
handler. The current tasklets handlers get the pointer of the "struct
bc_state", so it is an address we will need to retrieve from the
"struct bas_bc_state", parent of the tasklet being run. This commit adds
a new field in this structure, so we can get the address of the
corresponding "bcs" for any "ubc" and retrieve everything from the
tasklets handlers that will be modified soon.

Signed-off-by: Romain Perier <romain.perier@gmail.com>
 drivers/staging/isdn/gigaset/bas-gigaset.c | 1 +
 drivers/staging/isdn/gigaset/gigaset.h     | 1 +
 2 files changed, 2 insertions(+)

diff mbox series

diff --git a/drivers/staging/isdn/gigaset/bas-gigaset.c b/drivers/staging/isdn/gigaset/bas-gigaset.c
index c334525a5f63..a3febefde39b 100644
--- a/drivers/staging/isdn/gigaset/bas-gigaset.c
+++ b/drivers/staging/isdn/gigaset/bas-gigaset.c
@@ -2128,6 +2128,7 @@  static int gigaset_initbcshw(struct bc_state *bcs)
 		return -ENOMEM;
+	ubc->bcs = bcs;
 	ubc->running = 0;
 	atomic_set(&ubc->corrbytes, 0);
diff --git a/drivers/staging/isdn/gigaset/gigaset.h b/drivers/staging/isdn/gigaset/gigaset.h
index 0ecc2b5ea553..df745c7bf57c 100644
--- a/drivers/staging/isdn/gigaset/gigaset.h
+++ b/drivers/staging/isdn/gigaset/gigaset.h
@@ -559,6 +559,7 @@  struct bas_bc_state {
 	unsigned stolen0s;		/* '0' stuff bits also serving as
 					   leading flag bits */
 	struct tasklet_struct rcvd_tasklet;
+	struct bc_state *bcs;
 struct gigaset_ops {