On Tue, Sep 23, 2014 at 11:40:26AM -0700, David E. Box wrote: > +void baytrail_evaluate_sem(struct dw_i2c_dev *dev) > +{ > + acpi_status status; > + unsigned long long shared_host = 0; > + acpi_handle handle; > + > + if (!dev || !dev->dev) { > + pr_err("%s:%d: device is NULL\n", __func__, __LINE__); Not sure if it is useful to print things like above. > + return; > + } > + > + handle = ACPI_HANDLE(dev->dev); > + if (!handle) > + return; > + > + status = acpi_evaluate_integer(handle, "_SEM", NULL, &shared_host); Maybe it is better to check first if the operation succeeded before touching shared_host? if (ACPI_SUCCESS(status) && shared_host) { } Otherwise ACPI parts look good to me. > + > + if (shared_host) { > + dev_info(dev->dev, "I2C bus managed by PUNIT\n"); > + dev->has_hw_lock = true; > + dev->pm_runtime_disabled = true; > + } > +} > +EXPORT_SYMBOL(baytrail_evaluate_sem); -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html