From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Len Brown <lenb@kernel•org>
Cc: linux-next@vger•kernel.org, linux-kernel@vger•kernel.org,
Stefani Seibold <stefani@seibold•net>,
Andrew Morton <akpm@linux-foundation•org>,
Dmitry Torokhov <dmitry.torokhov@gmail•com>
Subject: linux-next: manual merge of the acpi tree with Linus' tree
Date: Thu, 24 Dec 2009 09:11:41 +1100 [thread overview]
Message-ID: <20091224091141.fa1cea64.sfr@canb.auug.org.au> (raw)
Hi Len,
Today's linux-next merge of the acpi tree got a conflict in
drivers/platform/x86/sony-laptop.c between commits
45465487897a1c6d508b14b904dc5777f7ec7e04 ("kfifo: move struct kfifo in
place"), c1e13f25674ed564948ecb7dfe5f83e578892896 ("kfifo: move out
spinlock") and 7acd72eb85f1c7a15e8b5eb554994949241737f1 ("kfifo: rename
kfifo_put... into kfifo_in... and kfifo_get... into kfifo_out...") from
Linus' tree and commit a287e9f941cf4bb8c167802c0f1cf04a93bc4e4c
("sony-laptop: remove private workqueue, use keventd instead") from the
acpi tree.
I fixed it up (see below) and can cay the fix for a while. This fix
needs checking.
--
Cheers,
Stephen Rothwell sfr@canb•auug.org.au
diff --cc drivers/platform/x86/sony-laptop.c
index 2896ca4,51314b4..0000000
--- a/drivers/platform/x86/sony-laptop.c
+++ b/drivers/platform/x86/sony-laptop.c
@@@ -142,9 -143,8 +143,8 @@@ struct sony_laptop_input_s
atomic_t users;
struct input_dev *jog_dev;
struct input_dev *key_dev;
- struct kfifo *fifo;
+ struct kfifo fifo;
spinlock_t fifo_lock;
- struct workqueue_struct *wq;
};
static struct sony_laptop_input_s sony_laptop_input = {
@@@ -298,12 -300,12 +300,13 @@@ static int sony_laptop_input_keycode_ma
/* release buttons after a short delay if pressed */
static void do_sony_laptop_release_key(struct work_struct *work)
{
+ struct delayed_work *dwork =
+ container_of(work, struct delayed_work, work);
struct sony_laptop_keypress kp;
- while (kfifo_out_locked(&sony_laptop_input.fifo, (unsigned char *)&kp,
- if (kfifo_get(sony_laptop_input.fifo,
- (unsigned char *)&kp, sizeof(kp)) == sizeof(kp)) {
++ if (kfifo_out_locked(&sony_laptop_input.fifo, (unsigned char *)&kp,
+ sizeof(kp), &sony_laptop_input.fifo_lock)
+ == sizeof(kp)) {
- msleep(10);
input_report_key(kp.dev, kp.key, 0);
input_sync(kp.dev);
}
@@@ -363,13 -375,12 +376,14 @@@ static void sony_laptop_report_input_ev
/* we emit the scancode so we can always remap the key */
input_event(kp.dev, EV_MSC, MSC_SCAN, event);
input_sync(kp.dev);
+
+ /* schedule key release */
- kfifo_put(sony_laptop_input.fifo,
- (unsigned char *)&kp, sizeof(kp));
+ kfifo_in_locked(&sony_laptop_input.fifo,
+ (unsigned char *)&kp, sizeof(kp),
+ &sony_laptop_input.fifo_lock);
+
- if (!work_pending(&sony_laptop_release_key_work))
- queue_work(sony_laptop_input.wq,
- &sony_laptop_release_key_work);
+ schedule_delayed_work(&sony_laptop_release_key_work,
+ msecs_to_jiffies(10));
} else
dprintk("unknown input event %.2x\n", event);
}
@@@ -470,11 -474,8 +475,8 @@@ err_unregister_keydev
err_free_keydev:
input_free_device(key_dev);
- err_destroy_wq:
- destroy_workqueue(sony_laptop_input.wq);
-
err_free_kfifo:
- kfifo_free(sony_laptop_input.fifo);
+ kfifo_free(&sony_laptop_input.fifo);
err_dec_users:
atomic_dec(&sony_laptop_input.users);
@@@ -499,8 -508,7 +509,7 @@@ static void sony_laptop_remove_input(vo
sony_laptop_input.jog_dev = NULL;
}
- destroy_workqueue(sony_laptop_input.wq);
- kfifo_free(sony_laptop_input.fifo);
+ kfifo_free(&sony_laptop_input.fifo);
}
/*********** Platform Device ***********/
next reply other threads:[~2009-12-23 22:11 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-23 22:11 Stephen Rothwell [this message]
2009-12-23 22:39 ` linux-next: manual merge of the acpi tree with Linus' tree Stephen Rothwell
2009-12-24 0:02 ` Stephen Rothwell
2009-12-24 5:02 ` Len Brown
2009-12-24 12:26 ` Stephen Rothwell
2009-12-24 20:05 ` Len Brown
2009-12-25 0:19 ` Stephen Rothwell
-- strict thread matches above, loose matches on Subject: below --
2012-10-07 23:49 Stephen Rothwell
2012-10-04 1:40 Stephen Rothwell
2012-03-30 0:46 Stephen Rothwell
2010-05-12 1:21 Stephen Rothwell
2010-01-18 2:56 Stephen Rothwell
2010-01-20 6:12 ` Len Brown
2010-01-20 6:29 ` Stephen Rothwell
2009-12-16 2:00 Stephen Rothwell
2009-03-30 3:20 Stephen Rothwell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091224091141.fa1cea64.sfr@canb.auug.org.au \
--to=sfr@canb$(echo .)auug.org.au \
--cc=akpm@linux-foundation$(echo .)org \
--cc=dmitry.torokhov@gmail$(echo .)com \
--cc=lenb@kernel$(echo .)org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=stefani@seibold$(echo .)net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox