dac->rst = devm_reset_control_get(codec->dev, "dac_rst");
if (IS_ERR(dac->rst)) {
dev_err(dai->codec->dev,
- "%s: ERROR: DAC reset control not defined (%d)!\n",
- __func__, (int)dac->rst);
+ "%s: ERROR: DAC reset control not defined !\n",
+ __func__);
dac->rst = NULL;
return -EFAULT;
}
{
struct device_node *pnode = pdev->dev.of_node;
struct sti_sas_data *drvdata;
+ const struct of_device_id *of_id;
/* Allocate device structure */
drvdata = devm_kzalloc(&pdev->dev, sizeof(struct sti_sas_data),
return -ENOMEM;
/* Populate data structure depending on compatibility */
- if (!of_match_node(sti_sas_dev_match, pnode)->data) {
+ of_id = of_match_node(sti_sas_dev_match, pnode);
+ if (!of_id->data) {
dev_err(&pdev->dev, "data associated to device is missing");
return -EINVAL;
}
- drvdata->dev_data = of_match_node(sti_sas_dev_match, pnode)->data;
+ drvdata->dev_data = (struct sti_sas_dev_data *)of_id->data;
/* Initialise device structure */
drvdata->dev = &pdev->dev;