* Re: [PATCH 3/3] Input: adxl34x - Fix references to adx134x
2011-02-11 15:33 ` [PATCH 3/3] Input: adxl34x - Fix references to adx134x Mark Brown
@ 2011-02-11 15:31 ` Michael Hennerich
2011-02-11 16:55 ` Dmitry Torokhov
0 siblings, 1 reply; 7+ messages in thread
From: Michael Hennerich @ 2011-02-11 15:31 UTC (permalink / raw)
To: Mark Brown; +Cc: Dmitry Torokhov, linux-input, device-drivers-devel
On 02/11/2011 04:33 PM, Mark Brown wrote:
> The adxl34x SPI driver has what appears to be a typo referring to the
> device as adx134x with the numeral 1 rather than letter l. This appears
> to be an error so convert.
>
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
>
Thought I fixed that before...
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
> ---
> drivers/input/misc/adxl34x-spi.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/input/misc/adxl34x-spi.c b/drivers/input/misc/adxl34x-spi.c
> index 5231add..f29de22 100644
> --- a/drivers/input/misc/adxl34x-spi.c
> +++ b/drivers/input/misc/adxl34x-spi.c
> @@ -58,7 +58,7 @@ static int adxl34x_spi_read_block(struct device *dev,
> return (status < 0) ? status : 0;
> }
>
> -static const struct adxl34x_bus_ops adx134x_spi_bops = {
> +static const struct adxl34x_bus_ops adxl34x_spi_bops = {
> .bustype = BUS_SPI,
> .write = adxl34x_spi_write,
> .read = adxl34x_spi_read,
> @@ -77,7 +77,7 @@ static int __devinit adxl34x_spi_probe(struct spi_device *spi)
>
> ac = adxl34x_probe(&spi->dev, spi->irq,
> spi->max_speed_hz > MAX_FREQ_NO_FIFODELAY,
> - &adx134x_spi_bops);
> + &adxl34x_spi_bops);
>
> if (IS_ERR(ac))
> return PTR_ERR(ac);
>
--
Greetings,
Michael
--
Analog Devices GmbH Wilhelm-Wagenfeld-Str. 6 80807 Muenchen
Sitz der Gesellschaft: Muenchen; Registergericht: Muenchen HRB 40368;
Geschaeftsfuehrer:Dr.Carsten Suckrow, Thomas Wessel, William A. Martin,
Margaret Seif
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/3] Input: adxl34x-spi - Convert to dev_pm_ops
2011-02-11 15:33 ` [PATCH 2/3] Input: adxl34x-spi " Mark Brown
@ 2011-02-11 15:31 ` Michael Hennerich
0 siblings, 0 replies; 7+ messages in thread
From: Michael Hennerich @ 2011-02-11 15:31 UTC (permalink / raw)
To: Mark Brown; +Cc: Dmitry Torokhov, linux-input
On 02/11/2011 04:33 PM, Mark Brown wrote:
> There is a general move to convert drivers to use dev_pm_ops rather than
> bus specific ones in order to facilitate core development. Do this
> conversion for adxl34x-spi.
>
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
> ---
> drivers/input/misc/adxl34x-spi.c | 16 +++++++++-------
> 1 files changed, 9 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/input/misc/adxl34x-spi.c b/drivers/input/misc/adxl34x-spi.c
> index 782de9e..5231add 100644
> --- a/drivers/input/misc/adxl34x-spi.c
> +++ b/drivers/input/misc/adxl34x-spi.c
> @@ -10,6 +10,7 @@
> #include <linux/input.h> /* BUS_SPI */
> #include <linux/module.h>
> #include <linux/spi/spi.h>
> +#include <linux/pm.h>
> #include <linux/types.h>
> #include "adxl34x.h"
>
> @@ -94,8 +95,9 @@ static int __devexit adxl34x_spi_remove(struct spi_device *spi)
> }
>
> #ifdef CONFIG_PM
> -static int adxl34x_spi_suspend(struct spi_device *spi, pm_message_t message)
> +static int adxl34x_spi_suspend(struct device *dev)
> {
> + struct spi_device *spi = to_spi_device(dev);
> struct adxl34x *ac = dev_get_drvdata(&spi->dev);
>
> adxl34x_suspend(ac);
> @@ -103,29 +105,29 @@ static int adxl34x_spi_suspend(struct spi_device *spi, pm_message_t message)
> return 0;
> }
>
> -static int adxl34x_spi_resume(struct spi_device *spi)
> +static int adxl34x_spi_resume(struct device *dev)
> {
> + struct spi_device *spi = to_spi_device(dev);
> struct adxl34x *ac = dev_get_drvdata(&spi->dev);
>
> adxl34x_resume(ac);
>
> return 0;
> }
> -#else
> -# define adxl34x_spi_suspend NULL
> -# define adxl34x_spi_resume NULL
> #endif
>
> +static SIMPLE_DEV_PM_OPS(adxl34x_spi_pm, adxl34x_spi_suspend,
> + adxl34x_spi_resume);
> +
> static struct spi_driver adxl34x_driver = {
> .driver = {
> .name = "adxl34x",
> .bus = &spi_bus_type,
> .owner = THIS_MODULE,
> + .pm = &adxl34x_spi_pm,
> },
> .probe = adxl34x_spi_probe,
> .remove = __devexit_p(adxl34x_spi_remove),
> - .suspend = adxl34x_spi_suspend,
> - .resume = adxl34x_spi_resume,
> };
>
> static int __init adxl34x_spi_init(void)
>
--
Greetings,
Michael
--
Analog Devices GmbH Wilhelm-Wagenfeld-Str. 6 80807 Muenchen
Sitz der Gesellschaft: Muenchen; Registergericht: Muenchen HRB 40368;
Geschaeftsfuehrer:Dr.Carsten Suckrow, Thomas Wessel, William A. Martin,
Margaret Seif
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/3] Input: adxl34x-i2c - Convert to dev_pm_ops
2011-02-11 15:33 [PATCH 1/3] Input: adxl34x-i2c - Convert to dev_pm_ops Mark Brown
@ 2011-02-11 15:31 ` Michael Hennerich
2011-02-11 15:33 ` [PATCH 2/3] Input: adxl34x-spi " Mark Brown
2011-02-11 15:33 ` [PATCH 3/3] Input: adxl34x - Fix references to adx134x Mark Brown
2 siblings, 0 replies; 7+ messages in thread
From: Michael Hennerich @ 2011-02-11 15:31 UTC (permalink / raw)
To: Mark Brown; +Cc: Dmitry Torokhov, linux-input, device-drivers-devel
On 02/11/2011 04:33 PM, Mark Brown wrote:
> There is a general move to convert drivers to use dev_pm_ops rather than
> bus specific ones in order to facilitate core development. Do this
> conversion for adxl34x-i2c.
>
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
> ---
> drivers/input/misc/adxl34x-i2c.c | 16 +++++++++-------
> 1 files changed, 9 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/input/misc/adxl34x-i2c.c b/drivers/input/misc/adxl34x-i2c.c
> index 0779724..ccacf2b 100644
> --- a/drivers/input/misc/adxl34x-i2c.c
> +++ b/drivers/input/misc/adxl34x-i2c.c
> @@ -11,6 +11,7 @@
> #include <linux/i2c.h>
> #include <linux/module.h>
> #include <linux/types.h>
> +#include <linux/pm.h>
> #include "adxl34x.h"
>
> static int adxl34x_smbus_read(struct device *dev, unsigned char reg)
> @@ -105,8 +106,9 @@ static int __devexit adxl34x_i2c_remove(struct i2c_client *client)
> }
>
> #ifdef CONFIG_PM
> -static int adxl34x_i2c_suspend(struct i2c_client *client, pm_message_t message)
> +static int adxl34x_i2c_suspend(struct device *dev)
> {
> + struct i2c_client *client = to_i2c_client(dev);
> struct adxl34x *ac = i2c_get_clientdata(client);
>
> adxl34x_suspend(ac);
> @@ -114,19 +116,20 @@ static int adxl34x_i2c_suspend(struct i2c_client *client, pm_message_t message)
> return 0;
> }
>
> -static int adxl34x_i2c_resume(struct i2c_client *client)
> +static int adxl34x_i2c_resume(struct device *dev)
> {
> + struct i2c_client *client = to_i2c_client(dev);
> struct adxl34x *ac = i2c_get_clientdata(client);
>
> adxl34x_resume(ac);
>
> return 0;
> }
> -#else
> -# define adxl34x_i2c_suspend NULL
> -# define adxl34x_i2c_resume NULL
> #endif
>
> +static SIMPLE_DEV_PM_OPS(adxl34x_i2c_pm, adxl34x_i2c_suspend,
> + adxl34x_i2c_resume);
> +
> static const struct i2c_device_id adxl34x_id[] = {
> { "adxl34x", 0 },
> { }
> @@ -138,11 +141,10 @@ static struct i2c_driver adxl34x_driver = {
> .driver = {
> .name = "adxl34x",
> .owner = THIS_MODULE,
> + .pm = &adxl34x_i2c_pm,
> },
> .probe = adxl34x_i2c_probe,
> .remove = __devexit_p(adxl34x_i2c_remove),
> - .suspend = adxl34x_i2c_suspend,
> - .resume = adxl34x_i2c_resume,
> .id_table = adxl34x_id,
> };
>
>
--
Greetings,
Michael
--
Analog Devices GmbH Wilhelm-Wagenfeld-Str. 6 80807 Muenchen
Sitz der Gesellschaft: Muenchen; Registergericht: Muenchen HRB 40368;
Geschaeftsfuehrer:Dr.Carsten Suckrow, Thomas Wessel, William A. Martin,
Margaret Seif
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/3] Input: adxl34x-i2c - Convert to dev_pm_ops
@ 2011-02-11 15:33 Mark Brown
2011-02-11 15:31 ` Michael Hennerich
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Mark Brown @ 2011-02-11 15:33 UTC (permalink / raw)
To: Michael Hennerich, Dmitry Torokhov; +Cc: linux-input, Mark Brown
There is a general move to convert drivers to use dev_pm_ops rather than
bus specific ones in order to facilitate core development. Do this
conversion for adxl34x-i2c.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
drivers/input/misc/adxl34x-i2c.c | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/drivers/input/misc/adxl34x-i2c.c b/drivers/input/misc/adxl34x-i2c.c
index 0779724..ccacf2b 100644
--- a/drivers/input/misc/adxl34x-i2c.c
+++ b/drivers/input/misc/adxl34x-i2c.c
@@ -11,6 +11,7 @@
#include <linux/i2c.h>
#include <linux/module.h>
#include <linux/types.h>
+#include <linux/pm.h>
#include "adxl34x.h"
static int adxl34x_smbus_read(struct device *dev, unsigned char reg)
@@ -105,8 +106,9 @@ static int __devexit adxl34x_i2c_remove(struct i2c_client *client)
}
#ifdef CONFIG_PM
-static int adxl34x_i2c_suspend(struct i2c_client *client, pm_message_t message)
+static int adxl34x_i2c_suspend(struct device *dev)
{
+ struct i2c_client *client = to_i2c_client(dev);
struct adxl34x *ac = i2c_get_clientdata(client);
adxl34x_suspend(ac);
@@ -114,19 +116,20 @@ static int adxl34x_i2c_suspend(struct i2c_client *client, pm_message_t message)
return 0;
}
-static int adxl34x_i2c_resume(struct i2c_client *client)
+static int adxl34x_i2c_resume(struct device *dev)
{
+ struct i2c_client *client = to_i2c_client(dev);
struct adxl34x *ac = i2c_get_clientdata(client);
adxl34x_resume(ac);
return 0;
}
-#else
-# define adxl34x_i2c_suspend NULL
-# define adxl34x_i2c_resume NULL
#endif
+static SIMPLE_DEV_PM_OPS(adxl34x_i2c_pm, adxl34x_i2c_suspend,
+ adxl34x_i2c_resume);
+
static const struct i2c_device_id adxl34x_id[] = {
{ "adxl34x", 0 },
{ }
@@ -138,11 +141,10 @@ static struct i2c_driver adxl34x_driver = {
.driver = {
.name = "adxl34x",
.owner = THIS_MODULE,
+ .pm = &adxl34x_i2c_pm,
},
.probe = adxl34x_i2c_probe,
.remove = __devexit_p(adxl34x_i2c_remove),
- .suspend = adxl34x_i2c_suspend,
- .resume = adxl34x_i2c_resume,
.id_table = adxl34x_id,
};
--
1.7.2.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/3] Input: adxl34x-spi - Convert to dev_pm_ops
2011-02-11 15:33 [PATCH 1/3] Input: adxl34x-i2c - Convert to dev_pm_ops Mark Brown
2011-02-11 15:31 ` Michael Hennerich
@ 2011-02-11 15:33 ` Mark Brown
2011-02-11 15:31 ` Michael Hennerich
2011-02-11 15:33 ` [PATCH 3/3] Input: adxl34x - Fix references to adx134x Mark Brown
2 siblings, 1 reply; 7+ messages in thread
From: Mark Brown @ 2011-02-11 15:33 UTC (permalink / raw)
To: Michael Hennerich, Dmitry Torokhov; +Cc: linux-input, Mark Brown
There is a general move to convert drivers to use dev_pm_ops rather than
bus specific ones in order to facilitate core development. Do this
conversion for adxl34x-spi.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
drivers/input/misc/adxl34x-spi.c | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/drivers/input/misc/adxl34x-spi.c b/drivers/input/misc/adxl34x-spi.c
index 782de9e..5231add 100644
--- a/drivers/input/misc/adxl34x-spi.c
+++ b/drivers/input/misc/adxl34x-spi.c
@@ -10,6 +10,7 @@
#include <linux/input.h> /* BUS_SPI */
#include <linux/module.h>
#include <linux/spi/spi.h>
+#include <linux/pm.h>
#include <linux/types.h>
#include "adxl34x.h"
@@ -94,8 +95,9 @@ static int __devexit adxl34x_spi_remove(struct spi_device *spi)
}
#ifdef CONFIG_PM
-static int adxl34x_spi_suspend(struct spi_device *spi, pm_message_t message)
+static int adxl34x_spi_suspend(struct device *dev)
{
+ struct spi_device *spi = to_spi_device(dev);
struct adxl34x *ac = dev_get_drvdata(&spi->dev);
adxl34x_suspend(ac);
@@ -103,29 +105,29 @@ static int adxl34x_spi_suspend(struct spi_device *spi, pm_message_t message)
return 0;
}
-static int adxl34x_spi_resume(struct spi_device *spi)
+static int adxl34x_spi_resume(struct device *dev)
{
+ struct spi_device *spi = to_spi_device(dev);
struct adxl34x *ac = dev_get_drvdata(&spi->dev);
adxl34x_resume(ac);
return 0;
}
-#else
-# define adxl34x_spi_suspend NULL
-# define adxl34x_spi_resume NULL
#endif
+static SIMPLE_DEV_PM_OPS(adxl34x_spi_pm, adxl34x_spi_suspend,
+ adxl34x_spi_resume);
+
static struct spi_driver adxl34x_driver = {
.driver = {
.name = "adxl34x",
.bus = &spi_bus_type,
.owner = THIS_MODULE,
+ .pm = &adxl34x_spi_pm,
},
.probe = adxl34x_spi_probe,
.remove = __devexit_p(adxl34x_spi_remove),
- .suspend = adxl34x_spi_suspend,
- .resume = adxl34x_spi_resume,
};
static int __init adxl34x_spi_init(void)
--
1.7.2.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/3] Input: adxl34x - Fix references to adx134x
2011-02-11 15:33 [PATCH 1/3] Input: adxl34x-i2c - Convert to dev_pm_ops Mark Brown
2011-02-11 15:31 ` Michael Hennerich
2011-02-11 15:33 ` [PATCH 2/3] Input: adxl34x-spi " Mark Brown
@ 2011-02-11 15:33 ` Mark Brown
2011-02-11 15:31 ` Michael Hennerich
2 siblings, 1 reply; 7+ messages in thread
From: Mark Brown @ 2011-02-11 15:33 UTC (permalink / raw)
To: Michael Hennerich, Dmitry Torokhov; +Cc: linux-input, Mark Brown
The adxl34x SPI driver has what appears to be a typo referring to the
device as adx134x with the numeral 1 rather than letter l. This appears
to be an error so convert.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
drivers/input/misc/adxl34x-spi.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/input/misc/adxl34x-spi.c b/drivers/input/misc/adxl34x-spi.c
index 5231add..f29de22 100644
--- a/drivers/input/misc/adxl34x-spi.c
+++ b/drivers/input/misc/adxl34x-spi.c
@@ -58,7 +58,7 @@ static int adxl34x_spi_read_block(struct device *dev,
return (status < 0) ? status : 0;
}
-static const struct adxl34x_bus_ops adx134x_spi_bops = {
+static const struct adxl34x_bus_ops adxl34x_spi_bops = {
.bustype = BUS_SPI,
.write = adxl34x_spi_write,
.read = adxl34x_spi_read,
@@ -77,7 +77,7 @@ static int __devinit adxl34x_spi_probe(struct spi_device *spi)
ac = adxl34x_probe(&spi->dev, spi->irq,
spi->max_speed_hz > MAX_FREQ_NO_FIFODELAY,
- &adx134x_spi_bops);
+ &adxl34x_spi_bops);
if (IS_ERR(ac))
return PTR_ERR(ac);
--
1.7.2.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 3/3] Input: adxl34x - Fix references to adx134x
2011-02-11 15:31 ` Michael Hennerich
@ 2011-02-11 16:55 ` Dmitry Torokhov
0 siblings, 0 replies; 7+ messages in thread
From: Dmitry Torokhov @ 2011-02-11 16:55 UTC (permalink / raw)
To: Michael Hennerich; +Cc: Mark Brown, linux-input, device-drivers-devel
On Fri, Feb 11, 2011 at 04:31:10PM +0100, Michael Hennerich wrote:
> On 02/11/2011 04:33 PM, Mark Brown wrote:
> > The adxl34x SPI driver has what appears to be a typo referring to the
> > device as adx134x with the numeral 1 rather than letter l. This appears
> > to be an error so convert.
> >
> > Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> >
> Thought I fixed that before...
> Acked-by: Michael Hennerich <michael.hennerich@analog.com>
>
One must have slipped through... Anyway, applied the whole lot.
Thanks.
--
Dmitry
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-02-11 16:55 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-11 15:33 [PATCH 1/3] Input: adxl34x-i2c - Convert to dev_pm_ops Mark Brown
2011-02-11 15:31 ` Michael Hennerich
2011-02-11 15:33 ` [PATCH 2/3] Input: adxl34x-spi " Mark Brown
2011-02-11 15:31 ` Michael Hennerich
2011-02-11 15:33 ` [PATCH 3/3] Input: adxl34x - Fix references to adx134x Mark Brown
2011-02-11 15:31 ` Michael Hennerich
2011-02-11 16:55 ` Dmitry Torokhov
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.