2006-12-16 22:48:19

by Alessandro Suardi

[permalink] [raw]
Subject: 2.6.20-rc1-git4: drivers/connector/connector.c doesn't build due to work_struct changes

CC [M] drivers/char/hangcheck-timer.o
CC drivers/clocksource/acpi_pm.o
LD drivers/clocksource/built-in.o
CC [M] drivers/connector/cn_queue.o
CC [M] drivers/connector/connector.o
drivers/connector/connector.c: In function 'cn_call_callback':
drivers/connector/connector.c:138: error: 'struct work_struct' has no
member named 'management'
drivers/connector/connector.c:138: error: 'struct work_struct' has no
member named 'management'
make[2]: *** [drivers/connector/connector.o] Error 1
make[1]: *** [drivers/connector] Error 2
make: *** [drivers] Error 2

--alessandro

"...when I get it, I _get_ it"

(Lara Eidemiller)


2006-12-18 10:57:13

by Peter Zijlstra

[permalink] [raw]
Subject: Re: 2.6.20-rc1-git4: drivers/connector/connector.c doesn't build due to work_struct changes

On Sat, 2006-12-16 at 23:48 +0100, Alessandro Suardi wrote:
> CC [M] drivers/char/hangcheck-timer.o
> CC drivers/clocksource/acpi_pm.o
> LD drivers/clocksource/built-in.o
> CC [M] drivers/connector/cn_queue.o
> CC [M] drivers/connector/connector.o
> drivers/connector/connector.c: In function 'cn_call_callback':
> drivers/connector/connector.c:138: error: 'struct work_struct' has no
> member named 'management'
> drivers/connector/connector.c:138: error: 'struct work_struct' has no
> member named 'management'
> make[2]: *** [drivers/connector/connector.o] Error 1
> make[1]: *** [drivers/connector] Error 2
> make: *** [drivers] Error 2


Signed-off-by: Peter Zijlstra <[email protected]>
---

diff --git a/drivers/connector/connector.c b/drivers/connector/connector.c
index 5e7cd45..2b8893b 100644
--- a/drivers/connector/connector.c
+++ b/drivers/connector/connector.c
@@ -135,8 +135,7 @@ static int cn_call_callback(struct cn_ms
spin_lock_bh(&dev->cbdev->queue_lock);
list_for_each_entry(__cbq, &dev->cbdev->queue_list, callback_entry) {
if (cn_cb_equal(&__cbq->id.id, &msg->id)) {
- if (likely(!test_bit(WORK_STRUCT_PENDING,
- &__cbq->work.work.management) &&
+ if (likely(!delayed_work_pending(&__cbq->work) &&
__cbq->data.ddata == NULL)) {
__cbq->data.callback_priv = msg;