linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] can: mcp251x: Fix regulators operation without CONFIG_REGULATOR
@ 2014-03-14  8:46 Alexander Shiyan
  2014-03-14  9:49 ` Marc Kleine-Budde
  0 siblings, 1 reply; 8+ messages in thread
From: Alexander Shiyan @ 2014-03-14  8:46 UTC (permalink / raw)
  To: linux-can; +Cc: Wolfgang Grandegger, Marc Kleine-Budde, Alexander Shiyan

If CONFIG_REGULATOR is not set, devm_regulator_get() returns NULL,
so use IS_ERR_OR_NULL() macro for checks.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 drivers/net/can/mcp251x.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/can/mcp251x.c b/drivers/net/can/mcp251x.c
index cdb9808..1b6acb1 100644
--- a/drivers/net/can/mcp251x.c
+++ b/drivers/net/can/mcp251x.c
@@ -672,7 +672,7 @@ static int mcp251x_hw_probe(struct spi_device *spi)
 
 static int mcp251x_power_enable(struct regulator *reg, int enable)
 {
-	if (IS_ERR(reg))
+	if (IS_ERR_OR_NULL(reg))
 		return 0;
 
 	if (enable)
@@ -1221,7 +1221,7 @@ static int mcp251x_can_suspend(struct device *dev)
 		priv->after_suspend = AFTER_SUSPEND_DOWN;
 	}
 
-	if (!IS_ERR(priv->power)) {
+	if (!IS_ERR_OR_NULL(priv->power)) {
 		regulator_disable(priv->power);
 		priv->after_suspend |= AFTER_SUSPEND_POWER;
 	}
-- 
1.8.3.2


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

* Re: [PATCH] can: mcp251x: Fix regulators operation without CONFIG_REGULATOR
  2014-03-14  8:46 [PATCH] can: mcp251x: Fix regulators operation without CONFIG_REGULATOR Alexander Shiyan
@ 2014-03-14  9:49 ` Marc Kleine-Budde
  2014-03-14  9:55   ` Alexander Shiyan
  0 siblings, 1 reply; 8+ messages in thread
From: Marc Kleine-Budde @ 2014-03-14  9:49 UTC (permalink / raw)
  To: Alexander Shiyan, linux-can; +Cc: Wolfgang Grandegger

[-- Attachment #1: Type: text/plain, Size: 551 bytes --]

On 03/14/2014 09:46 AM, Alexander Shiyan wrote:
> If CONFIG_REGULATOR is not set, devm_regulator_get() returns NULL,
> so use IS_ERR_OR_NULL() macro for checks.
> 
> Signed-off-by: Alexander Shiyan <shc_work@mail.ru>

This should probably go into net, right?

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 242 bytes --]

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

* Re: [PATCH] can: mcp251x: Fix regulators operation without CONFIG_REGULATOR
  2014-03-14  9:49 ` Marc Kleine-Budde
@ 2014-03-14  9:55   ` Alexander Shiyan
  2014-03-14  9:59     ` Marc Kleine-Budde
  0 siblings, 1 reply; 8+ messages in thread
From: Alexander Shiyan @ 2014-03-14  9:55 UTC (permalink / raw)
  To: Marc Kleine-Budde; +Cc: linux-can, Wolfgang Grandegger

Пятница, 14 марта 2014, 10:49 +01:00 от Marc Kleine-Budde <mkl@pengutronix.de>:
> On 03/14/2014 09:46 AM, Alexander Shiyan wrote:
> > If CONFIG_REGULATOR is not set, devm_regulator_get() returns NULL,
> > so use IS_ERR_OR_NULL() macro for checks.
> > 
> > Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
> 
> This should probably go into net, right?

net/can? I usually use the tag "can". Something wrong?

---

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

* Re: [PATCH] can: mcp251x: Fix regulators operation without CONFIG_REGULATOR
  2014-03-14  9:55   ` Alexander Shiyan
@ 2014-03-14  9:59     ` Marc Kleine-Budde
  2014-03-14 10:11       ` Alexander Shiyan
  0 siblings, 1 reply; 8+ messages in thread
From: Marc Kleine-Budde @ 2014-03-14  9:59 UTC (permalink / raw)
  To: Alexander Shiyan; +Cc: linux-can, Wolfgang Grandegger

[-- Attachment #1: Type: text/plain, Size: 845 bytes --]

On 03/14/2014 10:55 AM, Alexander Shiyan wrote:
> Пятница, 14 марта 2014, 10:49 +01:00 от Marc Kleine-Budde <mkl@pengutronix.de>:
>> On 03/14/2014 09:46 AM, Alexander Shiyan wrote:
>>> If CONFIG_REGULATOR is not set, devm_regulator_get() returns NULL,
>>> so use IS_ERR_OR_NULL() macro for checks.
>>>
>>> Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
>>
>> This should probably go into net, right?

I mean this is a patch for David Miller's net tree, not for net-next.

> net/can? I usually use the tag "can". Something wrong?

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 242 bytes --]

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

* Re: [PATCH] can: mcp251x: Fix regulators operation without CONFIG_REGULATOR
  2014-03-14  9:59     ` Marc Kleine-Budde
@ 2014-03-14 10:11       ` Alexander Shiyan
  2014-03-14 10:15         ` Marc Kleine-Budde
  0 siblings, 1 reply; 8+ messages in thread
From: Alexander Shiyan @ 2014-03-14 10:11 UTC (permalink / raw)
  To: Marc Kleine-Budde; +Cc: linux-can, Wolfgang Grandegger

Пятница, 14 марта 2014, 10:59 +01:00 от Marc Kleine-Budde <mkl@pengutronix.de>:
> On 03/14/2014 10:55 AM, Alexander Shiyan wrote:
> > Пятница, 14 марта 2014, 10:49 +01:00 от Marc Kleine-Budde <mkl@pengutronix.de>:
> >> On 03/14/2014 09:46 AM, Alexander Shiyan wrote:
> >>> If CONFIG_REGULATOR is not set, devm_regulator_get() returns NULL,
> >>> so use IS_ERR_OR_NULL() macro for checks.
> >>>
> >>> Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
> >>
> >> This should probably go into net, right?
> 
> I mean this is a patch for David Miller's net tree, not for net-next.

This is not a critical patch, patch just makes the right checks.

---

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

* Re: [PATCH] can: mcp251x: Fix regulators operation without CONFIG_REGULATOR
  2014-03-14 10:11       ` Alexander Shiyan
@ 2014-03-14 10:15         ` Marc Kleine-Budde
  2014-03-17  7:07           ` Oliver Hartkopp
  0 siblings, 1 reply; 8+ messages in thread
From: Marc Kleine-Budde @ 2014-03-14 10:15 UTC (permalink / raw)
  To: Alexander Shiyan; +Cc: linux-can, Wolfgang Grandegger

[-- Attachment #1: Type: text/plain, Size: 1101 bytes --]

On 03/14/2014 11:11 AM, Alexander Shiyan wrote:
> Пятница, 14 марта 2014, 10:59 +01:00 от Marc Kleine-Budde <mkl@pengutronix.de>:
>> On 03/14/2014 10:55 AM, Alexander Shiyan wrote:
>>> Пятница, 14 марта 2014, 10:49 +01:00 от Marc Kleine-Budde <mkl@pengutronix.de>:
>>>> On 03/14/2014 09:46 AM, Alexander Shiyan wrote:
>>>>> If CONFIG_REGULATOR is not set, devm_regulator_get() returns NULL,
>>>>> so use IS_ERR_OR_NULL() macro for checks.
>>>>>
>>>>> Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
>>>>
>>>> This should probably go into net, right?
>>
>> I mean this is a patch for David Miller's net tree, not for net-next.
> 
> This is not a critical patch, patch just makes the right checks.

Okay, applied to can-next, that goes via net-next into v3.15.

Thanks,
Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 242 bytes --]

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

* Re: [PATCH] can: mcp251x: Fix regulators operation without CONFIG_REGULATOR
  2014-03-14 10:15         ` Marc Kleine-Budde
@ 2014-03-17  7:07           ` Oliver Hartkopp
  2014-03-17  9:37             ` Marc Kleine-Budde
  0 siblings, 1 reply; 8+ messages in thread
From: Oliver Hartkopp @ 2014-03-17  7:07 UTC (permalink / raw)
  To: Marc Kleine-Budde, Alexander Shiyan; +Cc: linux-can, Wolfgang Grandegger

On 14.03.2014 11:15, Marc Kleine-Budde wrote:

> 
> Okay, applied to can-next, that goes via net-next into v3.15.
> 

Hello Marc,

Linus just tagged 3.14-rc7 with a relaxed comment:

	https://lkml.org/lkml/2014/3/16/166

So net-next might close this week.

Just FYI :-)

Regards,
Oliver

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

* Re: [PATCH] can: mcp251x: Fix regulators operation without CONFIG_REGULATOR
  2014-03-17  7:07           ` Oliver Hartkopp
@ 2014-03-17  9:37             ` Marc Kleine-Budde
  0 siblings, 0 replies; 8+ messages in thread
From: Marc Kleine-Budde @ 2014-03-17  9:37 UTC (permalink / raw)
  To: Oliver Hartkopp, Alexander Shiyan; +Cc: linux-can, Wolfgang Grandegger

[-- Attachment #1: Type: text/plain, Size: 673 bytes --]

On 03/17/2014 08:07 AM, Oliver Hartkopp wrote:
> On 14.03.2014 11:15, Marc Kleine-Budde wrote:
> 
>>
>> Okay, applied to can-next, that goes via net-next into v3.15.
>>
> 
> Hello Marc,
> 
> Linus just tagged 3.14-rc7 with a relaxed comment:
> 
> 	https://lkml.org/lkml/2014/3/16/166
> 
> So net-next might close this week.
> 
> Just FYI :-)

Done, pull-request sent :)

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 242 bytes --]

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

end of thread, other threads:[~2014-03-17  9:38 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-14  8:46 [PATCH] can: mcp251x: Fix regulators operation without CONFIG_REGULATOR Alexander Shiyan
2014-03-14  9:49 ` Marc Kleine-Budde
2014-03-14  9:55   ` Alexander Shiyan
2014-03-14  9:59     ` Marc Kleine-Budde
2014-03-14 10:11       ` Alexander Shiyan
2014-03-14 10:15         ` Marc Kleine-Budde
2014-03-17  7:07           ` Oliver Hartkopp
2014-03-17  9:37             ` Marc Kleine-Budde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).