Commit c6aa871a authored by Federico Vaga's avatar Federico Vaga

sw:drv: detect memops later

Like this we will bet the device registered properly, which means that
the dev_err() messages will be printed correctly.
Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent 4f5e52a1
......@@ -537,10 +537,6 @@ int trtl_probe(struct platform_device *pdev)
trtl->base_hmq = trtl->base_core + TRTL_ADDR_OFFSET_HMQ;
trtl->base_cfg = trtl->base_core + TRTL_ADDR_OFFSET_CONFIG_ROM;
err = trtl_memops_detect(trtl);
if (err)
return err;
/* Register the device */
err = dev_set_name(&trtl->dev, "trtl-%04x", pdev->id);
if (err)
......@@ -556,6 +552,10 @@ int trtl_probe(struct platform_device *pdev)
if (err)
goto out_reg;
err = trtl_memops_detect(trtl);
if (err)
goto out_mops;
err = trtl_config_rom_dump(trtl);
if (err)
goto out_rom;
......@@ -625,6 +625,7 @@ out_cpu:
out_rom:
sysfs_remove_bin_file(&trtl->dev.kobj, &trtl_config_rom_sysfs);
out_cfg:
out_mops:
device_unregister(&trtl->dev);
out_reg:
trtl_minor_put(&trtl->dev);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment