can: mcp251x: get regulators optionally
authorStefan Agner <stefan@agner.ch>
Mon, 18 May 2015 16:33:28 +0000 (18:33 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Thu, 16 Jul 2015 07:04:22 +0000 (09:04 +0200)
commit69da3f2ac528642acbd06ed14564ac1b9a918394
treeb8d502e46fa867e830901f6f01cdadaaf0e6c05a
parent25b401c1816ae64bcc5dcb1d39ab41812522a0ce
can: mcp251x: get regulators optionally

The regulators power and transceiver are optional. If those are not
present, the pointer (or error pointer) is correctly handled by the
driver, hence we can use devm_regulator_get_optional safely, which
avoids regulators getting created.

Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/spi/mcp251x.c