|
@@ -757,7 +757,7 @@ mv64xxx_of_config(struct mv64xxx_i2c_data *drv_data,
|
|
}
|
|
}
|
|
drv_data->irq = irq_of_parse_and_map(np, 0);
|
|
drv_data->irq = irq_of_parse_and_map(np, 0);
|
|
|
|
|
|
- drv_data->rstc = devm_reset_control_get(dev, NULL);
|
|
|
|
|
|
+ drv_data->rstc = devm_reset_control_get_optional(dev, NULL);
|
|
if (IS_ERR(drv_data->rstc)) {
|
|
if (IS_ERR(drv_data->rstc)) {
|
|
if (PTR_ERR(drv_data->rstc) == -EPROBE_DEFER) {
|
|
if (PTR_ERR(drv_data->rstc) == -EPROBE_DEFER) {
|
|
rc = -EPROBE_DEFER;
|
|
rc = -EPROBE_DEFER;
|
|
@@ -889,7 +889,7 @@ mv64xxx_i2c_probe(struct platform_device *pd)
|
|
exit_free_irq:
|
|
exit_free_irq:
|
|
free_irq(drv_data->irq, drv_data);
|
|
free_irq(drv_data->irq, drv_data);
|
|
exit_reset:
|
|
exit_reset:
|
|
- if (pd->dev.of_node && !IS_ERR(drv_data->rstc))
|
|
|
|
|
|
+ if (!IS_ERR_OR_NULL(drv_data->rstc))
|
|
reset_control_assert(drv_data->rstc);
|
|
reset_control_assert(drv_data->rstc);
|
|
exit_clk:
|
|
exit_clk:
|
|
#if defined(CONFIG_HAVE_CLK)
|
|
#if defined(CONFIG_HAVE_CLK)
|
|
@@ -909,7 +909,7 @@ mv64xxx_i2c_remove(struct platform_device *dev)
|
|
|
|
|
|
i2c_del_adapter(&drv_data->adapter);
|
|
i2c_del_adapter(&drv_data->adapter);
|
|
free_irq(drv_data->irq, drv_data);
|
|
free_irq(drv_data->irq, drv_data);
|
|
- if (dev->dev.of_node && !IS_ERR(drv_data->rstc))
|
|
|
|
|
|
+ if (!IS_ERR_OR_NULL(drv_data->rstc))
|
|
reset_control_assert(drv_data->rstc);
|
|
reset_control_assert(drv_data->rstc);
|
|
#if defined(CONFIG_HAVE_CLK)
|
|
#if defined(CONFIG_HAVE_CLK)
|
|
/* Not all platforms have a clk */
|
|
/* Not all platforms have a clk */
|