Re: [PATCH V2 1/3] scsi: ufs: Allow vendor specific initialization

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




>
> +static int ufshcd_variant_hba_init(struct ufs_hba *hba)
> +{
> +       int err = 0;
> +
> +       if (!hba->vops)
> +               goto out;
> +
> +       if (hba->vops->init) {
> +               err = hba->vops->init(hba);
> +               if (err)
> +                       goto out;
> +       }
> +
> +       if (hba->vops->setup_clocks) {
> +               err = hba->vops->setup_clocks(hba, true);
> +               if (err)
> +                       goto out_exit;
> +       }
> +
> +       if (hba->vops->setup_regulators) {
> +               err = hba->vops->setup_regulators(hba, true);
> +               if (err)
> +                       goto out_clks;
> +       }
> +
> +       goto out;
> +
> +out_clks:
> +       if (hba->vops->setup_clocks)
> +               hba->vops->setup_clocks(hba, false);
> +out_exit:
> +       if (hba->vops->exit)
> +               hba->vops->exit(hba);
> +out:
> +       if (err)
> +               dev_err(hba->dev, "%s: variant %s init failed err %d\n",
> +                       __func__, hba->vops ? hba->vops->name : "", err);
                                              ^^^^^^^
a minor comment, 'hba->vops' will not be NULL here,

> +       return err;
> +}
> +


-- 
~Santosh
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux