[PRE-REVIEW PATCH 08/16] isdn: Prepare to use the new tasklet API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 drivers/staging/isdn/gigaset/bas-gigaset.c | 1 +
 drivers/staging/isdn/gigaset/gigaset.h     | 1 +
 2 files changed, 2 insertions(+)

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);
 	spin_lock_init(&ubc->isooutlock);
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 {
-- 
2.23.0




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux