All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] Sonypi: use synchronize_irq instead of sycnronize_sched
@ 2007-10-31  4:41 Dmitry Torokhov
  2007-10-31  4:43 ` [PATCH 2/2] Sonypi: fit input devices into sysfs tree Dmitry Torokhov
  2007-11-20 23:08 ` [PATCH 1/2] Sonypi: use synchronize_irq instead of sycnronize_sched Mattia Dongili
  0 siblings, 2 replies; 4+ messages in thread
From: Dmitry Torokhov @ 2007-10-31  4:41 UTC (permalink / raw)
  To: Mattia Dongili; +Cc: linux-acpi

Hi Mattia,

It looks like you are also looking after sonypi...

-- 
Dmitry

Subject: Sonypi: use synchronize_irq instead of sycnronize_sched
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>

We know exactly what IRQ we are using, so synchronize_irq()
suits much better. Plus synchronize_sched() will not work
for us in -rt kernels.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
---
 drivers/char/sonypi.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux/drivers/char/sonypi.c
===================================================================
--- linux.orig/drivers/char/sonypi.c
+++ linux/drivers/char/sonypi.c
@@ -1432,7 +1432,7 @@ static int __devexit sonypi_remove(struc
 {
 	sonypi_disable();
 
-	synchronize_sched();  /* Allow sonypi interrupt to complete. */
+	synchronize_irq(sonypi_device.irq);
 	flush_scheduled_work();
 
 	if (useinput) {

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 2/2] Sonypi: fit input devices into sysfs tree
  2007-10-31  4:41 [PATCH 1/2] Sonypi: use synchronize_irq instead of sycnronize_sched Dmitry Torokhov
@ 2007-10-31  4:43 ` Dmitry Torokhov
  2007-11-20 23:09   ` Mattia Dongili
  2007-11-20 23:08 ` [PATCH 1/2] Sonypi: use synchronize_irq instead of sycnronize_sched Mattia Dongili
  1 sibling, 1 reply; 4+ messages in thread
From: Dmitry Torokhov @ 2007-10-31  4:43 UTC (permalink / raw)
  To: Mattia Dongili; +Cc: linux-acpi

Subject: Sonypi: fit input devices into sysfs tree
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>

Properly set up parent on input devices registered by sonypi.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
---
 drivers/char/sonypi.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Index: linux/drivers/char/sonypi.c
===================================================================
--- linux.orig/drivers/char/sonypi.c
+++ linux/drivers/char/sonypi.c
@@ -1163,7 +1163,7 @@ static struct acpi_driver sonypi_acpi_dr
 };
 #endif
 
-static int __devinit sonypi_create_input_devices(void)
+static int __devinit sonypi_create_input_devices(struct platform_device *pdev)
 {
 	struct input_dev *jog_dev;
 	struct input_dev *key_dev;
@@ -1177,6 +1177,7 @@ static int __devinit sonypi_create_input
 	jog_dev->name = "Sony Vaio Jogdial";
 	jog_dev->id.bustype = BUS_ISA;
 	jog_dev->id.vendor = PCI_VENDOR_ID_SONY;
+	jog_dev->dev.parent = &pdev->dev;
 
 	jog_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REL);
 	jog_dev->keybit[BIT_WORD(BTN_MOUSE)] = BIT_MASK(BTN_MIDDLE);
@@ -1191,6 +1192,7 @@ static int __devinit sonypi_create_input
 	key_dev->name = "Sony Vaio Keys";
 	key_dev->id.bustype = BUS_ISA;
 	key_dev->id.vendor = PCI_VENDOR_ID_SONY;
+	key_dev->dev.parent = &pdev->dev;
 
 	/* Initialize the Input Drivers: special keys */
 	key_dev->evbit[0] = BIT_MASK(EV_KEY);
@@ -1385,7 +1387,7 @@ static int __devinit sonypi_probe(struct
 
 	if (useinput) {
 
-		error = sonypi_create_input_devices();
+		error = sonypi_create_input_devices(dev);
 		if (error) {
 			printk(KERN_ERR
 				"sonypi: failed to create input devices\n");

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] Sonypi: use synchronize_irq instead of sycnronize_sched
  2007-10-31  4:41 [PATCH 1/2] Sonypi: use synchronize_irq instead of sycnronize_sched Dmitry Torokhov
  2007-10-31  4:43 ` [PATCH 2/2] Sonypi: fit input devices into sysfs tree Dmitry Torokhov
@ 2007-11-20 23:08 ` Mattia Dongili
  1 sibling, 0 replies; 4+ messages in thread
From: Mattia Dongili @ 2007-11-20 23:08 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-acpi

On Wed, Oct 31, 2007 at 12:41:54AM -0400, Dmitry Torokhov wrote:
> Hi Mattia,
> 
> It looks like you are also looking after sonypi...
> 
> -- 
> Dmitry
> 
> Subject: Sonypi: use synchronize_irq instead of sycnronize_sched
> From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> 
> We know exactly what IRQ we are using, so synchronize_irq()
> suits much better. Plus synchronize_sched() will not work
> for us in -rt kernels.
> 
> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>

Acked-by: Mattia Dongili <malattia@linux.it>

> ---
>  drivers/char/sonypi.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Index: linux/drivers/char/sonypi.c
> ===================================================================
> --- linux.orig/drivers/char/sonypi.c
> +++ linux/drivers/char/sonypi.c
> @@ -1432,7 +1432,7 @@ static int __devexit sonypi_remove(struc
>  {
>  	sonypi_disable();
>  
> -	synchronize_sched();  /* Allow sonypi interrupt to complete. */
> +	synchronize_irq(sonypi_device.irq);
>  	flush_scheduled_work();
>  
>  	if (useinput) {
> 
-- 
mattia
:wq!

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] Sonypi: fit input devices into sysfs tree
  2007-10-31  4:43 ` [PATCH 2/2] Sonypi: fit input devices into sysfs tree Dmitry Torokhov
@ 2007-11-20 23:09   ` Mattia Dongili
  0 siblings, 0 replies; 4+ messages in thread
From: Mattia Dongili @ 2007-11-20 23:09 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-acpi

On Wed, Oct 31, 2007 at 12:43:10AM -0400, Dmitry Torokhov wrote:
> Subject: Sonypi: fit input devices into sysfs tree
> From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> 
> Properly set up parent on input devices registered by sonypi.
> 
> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>

Acked-by: Mattia Dongili <malattia@linux.it>

> ---
>  drivers/char/sonypi.c |    6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> Index: linux/drivers/char/sonypi.c
> ===================================================================
> --- linux.orig/drivers/char/sonypi.c
> +++ linux/drivers/char/sonypi.c
> @@ -1163,7 +1163,7 @@ static struct acpi_driver sonypi_acpi_dr
>  };
>  #endif
>  
> -static int __devinit sonypi_create_input_devices(void)
> +static int __devinit sonypi_create_input_devices(struct platform_device *pdev)
>  {
>  	struct input_dev *jog_dev;
>  	struct input_dev *key_dev;
> @@ -1177,6 +1177,7 @@ static int __devinit sonypi_create_input
>  	jog_dev->name = "Sony Vaio Jogdial";
>  	jog_dev->id.bustype = BUS_ISA;
>  	jog_dev->id.vendor = PCI_VENDOR_ID_SONY;
> +	jog_dev->dev.parent = &pdev->dev;
>  
>  	jog_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REL);
>  	jog_dev->keybit[BIT_WORD(BTN_MOUSE)] = BIT_MASK(BTN_MIDDLE);
> @@ -1191,6 +1192,7 @@ static int __devinit sonypi_create_input
>  	key_dev->name = "Sony Vaio Keys";
>  	key_dev->id.bustype = BUS_ISA;
>  	key_dev->id.vendor = PCI_VENDOR_ID_SONY;
> +	key_dev->dev.parent = &pdev->dev;
>  
>  	/* Initialize the Input Drivers: special keys */
>  	key_dev->evbit[0] = BIT_MASK(EV_KEY);
> @@ -1385,7 +1387,7 @@ static int __devinit sonypi_probe(struct
>  
>  	if (useinput) {
>  
> -		error = sonypi_create_input_devices();
> +		error = sonypi_create_input_devices(dev);
>  		if (error) {
>  			printk(KERN_ERR
>  				"sonypi: failed to create input devices\n");
> 
-- 
mattia
:wq!

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-11-20 23:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-31  4:41 [PATCH 1/2] Sonypi: use synchronize_irq instead of sycnronize_sched Dmitry Torokhov
2007-10-31  4:43 ` [PATCH 2/2] Sonypi: fit input devices into sysfs tree Dmitry Torokhov
2007-11-20 23:09   ` Mattia Dongili
2007-11-20 23:08 ` [PATCH 1/2] Sonypi: use synchronize_irq instead of sycnronize_sched Mattia Dongili

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.