On 09/13/2012 04:14 PM, Kevin Hilman wrote:
> AnilKumar Ch <anilku...@ti.com> writes:
> 
>> Move pm_runtime_enable/disable calls to c_can.c driver. Current
>> implementation is such that platform driver is doing pm_runtime
>> enable/disable and core driver is doing put_sync/get_sync.
>>
>> PM runtime calls should be invoked if there is a valid device
>> pointer from platform driver so moving enable/disable calls
>> to core driver.
>>
>> Signed-off-by: AnilKumar Ch <anilku...@ti.com>
>> ---
>> Incorporated Kevin's comments on "can: c_can: Add runtime PM
>> support to Bosch C_CAN/D_CAN controller" patch.
> 
> This looks better, but in addition, you can get rid of the
> runtime PM helper functions you added (the ones that check for
> priv->device) and call the pm_runtime_get/put APIs directly.

But priv->device might be NULL. AFAICS pm_runtime_get() is not safe to
be called with a NULL pointer.

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: signature.asc
Description: OpenPGP digital signature

Reply via email to