Merge branch 'next'
[platform/kernel/u-boot.git] / drivers / clk / clk-cdce9xx.c
index fd47872..f23465d 100644 (file)
@@ -86,19 +86,13 @@ static int cdce9xx_reg_write(struct udevice *dev, u8 addr, u8 val)
        return ret;
 }
 
-static int cdce9xx_clk_of_xlate(struct clk *clk,
-                               struct ofnode_phandle_args *args)
+static int cdce9xx_clk_request(struct clk *clk)
 {
        struct cdce9xx_clk_data *data = dev_get_priv(clk->dev);
 
-       if (args->args_count != 1)
+       if (clk->id > data->chip->num_outputs)
                return -EINVAL;
 
-       if (args->args[0] > data->chip->num_outputs)
-               return -EINVAL;
-
-       clk->id = args->args[0];
-
        return 0;
 }
 
@@ -241,7 +235,7 @@ static const struct udevice_id cdce9xx_clk_of_match[] = {
 };
 
 static const struct clk_ops cdce9xx_clk_ops = {
-       .of_xlate = cdce9xx_clk_of_xlate,
+       .request = cdce9xx_clk_request,
        .get_rate = cdce9xx_clk_get_rate,
        .set_rate = cdce9xx_clk_set_rate,
 };
@@ -251,6 +245,6 @@ U_BOOT_DRIVER(cdce9xx_clk) = {
        .id = UCLASS_CLK,
        .of_match = cdce9xx_clk_of_match,
        .probe = cdce9xx_clk_probe,
-       .priv_auto_alloc_size = sizeof(struct cdce9xx_clk_data),
+       .priv_auto      = sizeof(struct cdce9xx_clk_data),
        .ops = &cdce9xx_clk_ops,
 };