Re: [PATCH 4/6] phy: remove the old lookup method

2014-08-25 Thread Vivek Gautam
On Mon, Aug 25, 2014 at 1:47 PM, Heikki Krogerus
 wrote:
> On Mon, Aug 25, 2014 at 01:11:34PM +0530, Vivek Gautam wrote:
>> Please squash the attached diff which removes the 'init_data' field
>> from some of the other instances
>> of devm_phy_create() in few other drivers.
>> This should prevent any build errors that i could see with 
>> multi_v7_defconfig.
>
> OK, I'll add those changes into this patch, and it seems there
> is now at least one more new driver on top of those calling
> devm_phy_create.

Ok, i think i just saw this on 3.17-rc1.




-- 
Best Regards
Vivek Gautam
Samsung R Institute, Bangalore
India
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 4/6] phy: remove the old lookup method

2014-08-25 Thread Heikki Krogerus
On Mon, Aug 25, 2014 at 01:11:34PM +0530, Vivek Gautam wrote:
> Please squash the attached diff which removes the 'init_data' field
> from some of the other instances
> of devm_phy_create() in few other drivers.
> This should prevent any build errors that i could see with multi_v7_defconfig.

OK, I'll add those changes into this patch, and it seems there
is now at least one more new driver on top of those calling
devm_phy_create.


Thanks!

-- 
heikki
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 4/6] phy: remove the old lookup method

2014-08-25 Thread Vivek Gautam
Hi Heikki,


On Thu, Aug 21, 2014 at 5:03 PM, Heikki Krogerus
 wrote:
> The users of the old method are now converted to the new one.
>
> Signed-off-by: Heikki Krogerus 
> Tested-by: Vivek Gautam 
> ---
>  drivers/phy/phy-bcm-kona-usb2.c |  2 +-
>  drivers/phy/phy-core.c  | 45 
> +++--
>  drivers/phy/phy-exynos-dp-video.c   |  2 +-
>  drivers/phy/phy-exynos-mipi-video.c |  2 +-
>  drivers/phy/phy-exynos5-usbdrd.c|  3 +--
>  drivers/phy/phy-exynos5250-sata.c   |  2 +-
>  drivers/phy/phy-mvebu-sata.c|  2 +-
>  drivers/phy/phy-omap-usb2.c |  2 +-
>  drivers/phy/phy-samsung-usb2.c  |  3 +--
>  drivers/phy/phy-sun4i-usb.c |  2 +-
>  drivers/phy/phy-ti-pipe3.c  |  2 +-
>  drivers/phy/phy-twl4030-usb.c   |  4 +---
>  drivers/phy/phy-xgene.c |  2 +-
>  include/linux/phy/phy.h | 38 ---
>  14 files changed, 19 insertions(+), 92 deletions(-)

Please squash the attached diff which removes the 'init_data' field
from some of the other instances
of devm_phy_create() in few other drivers.
This should prevent any build errors that i could see with multi_v7_defconfig.

>
> diff --git a/drivers/phy/phy-bcm-kona-usb2.c b/drivers/phy/phy-bcm-kona-usb2.c
> index 894fe74..3463983 100644
> --- a/drivers/phy/phy-bcm-kona-usb2.c
> +++ b/drivers/phy/phy-bcm-kona-usb2.c
> @@ -117,7 +117,7 @@ static int bcm_kona_usb2_probe(struct platform_device 
> *pdev)
>
> platform_set_drvdata(pdev, phy);
>
> -   gphy = devm_phy_create(dev, NULL, , NULL);
> +   gphy = devm_phy_create(dev, NULL, );
> if (IS_ERR(gphy))
> return PTR_ERR(gphy);
>
> diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c
> index 67a8c726..834b337 100644
> --- a/drivers/phy/phy-core.c
> +++ b/drivers/phy/phy-core.c
> @@ -55,36 +55,6 @@ static int devm_phy_match(struct device *dev, void *res, 
> void *match_data)
> return res == match_data;
>  }
>
> -static struct phy *phy_lookup(struct device *device, const char *port)
> -{
> -   unsigned int count;
> -   struct phy *phy;
> -   struct device *dev;
> -   struct phy_consumer *consumers;
> -   struct class_dev_iter iter;
> -
> -   class_dev_iter_init(, phy_class, NULL, NULL);
> -   while ((dev = class_dev_iter_next())) {
> -   phy = to_phy(dev);
> -
> -   if (!phy->init_data)
> -   continue;
> -   count = phy->init_data->num_consumers;
> -   consumers = phy->init_data->consumers;
> -   while (count--) {
> -   if (!strcmp(consumers->dev_name, dev_name(device)) &&
> -   !strcmp(consumers->port, port)) {
> -   class_dev_iter_exit();
> -   return phy;
> -   }
> -   consumers++;
> -   }
> -   }
> -
> -   class_dev_iter_exit();
> -   return ERR_PTR(-ENODEV);
> -}
> -
>  /**
>   * phy_register_lookup() - register PHY/device association
>   * @pl: association to register
> @@ -210,10 +180,6 @@ static struct phy *phy_find(struct device *dev, const 
> char *con_id)
> }
> class_dev_iter_exit();
> }
> -
> -   /* fall-back to the old lookup method for now */
> -   if (IS_ERR(phy))
> -   phy = phy_lookup(dev, con_id);
> return phy;
>  }
>
> @@ -721,13 +687,11 @@ EXPORT_SYMBOL_GPL(devm_of_phy_get);
>   * @dev: device that is creating the new phy
>   * @node: device node of the phy
>   * @ops: function pointers for performing phy operations
> - * @init_data: contains the list of PHY consumers or NULL
>   *
>   * Called to create a phy using phy framework.
>   */
>  struct phy *phy_create(struct device *dev, struct device_node *node,
> -  const struct phy_ops *ops,
> -  struct phy_init_data *init_data)
> +  const struct phy_ops *ops)
>  {
> int ret;
> int id;
> @@ -765,7 +729,6 @@ struct phy *phy_create(struct device *dev, struct 
> device_node *node,
> phy->dev.of_node = node ?: dev->of_node;
> phy->id = id;
> phy->ops = ops;
> -   phy->init_data = init_data;
>
> ret = dev_set_name(>dev, "phy-%s.%d", dev_name(dev), id);
> if (ret)
> @@ -800,7 +763,6 @@ EXPORT_SYMBOL_GPL(phy_create);
>   * @dev: device that is creating the new phy
>   * @node: device node of the phy
>   * @ops: function pointers for performing phy operations
> - * @init_data: contains the list of PHY consumers or NULL
>   *
>   * Creates a new PHY device adding it to the PHY class.
>   * While at that, it also associates the device with the phy using devres.
> @@ -808,8 +770,7 @@ EXPORT_SYMBOL_GPL(phy_create);
>   * then, devres data is freed.
>   */
>  struct phy *devm_phy_create(struct device *dev, struct 

Re: [PATCH 4/6] phy: remove the old lookup method

2014-08-25 Thread Vivek Gautam
Hi Heikki,


On Thu, Aug 21, 2014 at 5:03 PM, Heikki Krogerus
heikki.kroge...@linux.intel.com wrote:
 The users of the old method are now converted to the new one.

 Signed-off-by: Heikki Krogerus heikki.kroge...@linux.intel.com
 Tested-by: Vivek Gautam gautam.vi...@samsung.com
 ---
  drivers/phy/phy-bcm-kona-usb2.c |  2 +-
  drivers/phy/phy-core.c  | 45 
 +++--
  drivers/phy/phy-exynos-dp-video.c   |  2 +-
  drivers/phy/phy-exynos-mipi-video.c |  2 +-
  drivers/phy/phy-exynos5-usbdrd.c|  3 +--
  drivers/phy/phy-exynos5250-sata.c   |  2 +-
  drivers/phy/phy-mvebu-sata.c|  2 +-
  drivers/phy/phy-omap-usb2.c |  2 +-
  drivers/phy/phy-samsung-usb2.c  |  3 +--
  drivers/phy/phy-sun4i-usb.c |  2 +-
  drivers/phy/phy-ti-pipe3.c  |  2 +-
  drivers/phy/phy-twl4030-usb.c   |  4 +---
  drivers/phy/phy-xgene.c |  2 +-
  include/linux/phy/phy.h | 38 ---
  14 files changed, 19 insertions(+), 92 deletions(-)

Please squash the attached diff which removes the 'init_data' field
from some of the other instances
of devm_phy_create() in few other drivers.
This should prevent any build errors that i could see with multi_v7_defconfig.


 diff --git a/drivers/phy/phy-bcm-kona-usb2.c b/drivers/phy/phy-bcm-kona-usb2.c
 index 894fe74..3463983 100644
 --- a/drivers/phy/phy-bcm-kona-usb2.c
 +++ b/drivers/phy/phy-bcm-kona-usb2.c
 @@ -117,7 +117,7 @@ static int bcm_kona_usb2_probe(struct platform_device 
 *pdev)

 platform_set_drvdata(pdev, phy);

 -   gphy = devm_phy_create(dev, NULL, ops, NULL);
 +   gphy = devm_phy_create(dev, NULL, ops);
 if (IS_ERR(gphy))
 return PTR_ERR(gphy);

 diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c
 index 67a8c726..834b337 100644
 --- a/drivers/phy/phy-core.c
 +++ b/drivers/phy/phy-core.c
 @@ -55,36 +55,6 @@ static int devm_phy_match(struct device *dev, void *res, 
 void *match_data)
 return res == match_data;
  }

 -static struct phy *phy_lookup(struct device *device, const char *port)
 -{
 -   unsigned int count;
 -   struct phy *phy;
 -   struct device *dev;
 -   struct phy_consumer *consumers;
 -   struct class_dev_iter iter;
 -
 -   class_dev_iter_init(iter, phy_class, NULL, NULL);
 -   while ((dev = class_dev_iter_next(iter))) {
 -   phy = to_phy(dev);
 -
 -   if (!phy-init_data)
 -   continue;
 -   count = phy-init_data-num_consumers;
 -   consumers = phy-init_data-consumers;
 -   while (count--) {
 -   if (!strcmp(consumers-dev_name, dev_name(device)) 
 -   !strcmp(consumers-port, port)) {
 -   class_dev_iter_exit(iter);
 -   return phy;
 -   }
 -   consumers++;
 -   }
 -   }
 -
 -   class_dev_iter_exit(iter);
 -   return ERR_PTR(-ENODEV);
 -}
 -
  /**
   * phy_register_lookup() - register PHY/device association
   * @pl: association to register
 @@ -210,10 +180,6 @@ static struct phy *phy_find(struct device *dev, const 
 char *con_id)
 }
 class_dev_iter_exit(iter);
 }
 -
 -   /* fall-back to the old lookup method for now */
 -   if (IS_ERR(phy))
 -   phy = phy_lookup(dev, con_id);
 return phy;
  }

 @@ -721,13 +687,11 @@ EXPORT_SYMBOL_GPL(devm_of_phy_get);
   * @dev: device that is creating the new phy
   * @node: device node of the phy
   * @ops: function pointers for performing phy operations
 - * @init_data: contains the list of PHY consumers or NULL
   *
   * Called to create a phy using phy framework.
   */
  struct phy *phy_create(struct device *dev, struct device_node *node,
 -  const struct phy_ops *ops,
 -  struct phy_init_data *init_data)
 +  const struct phy_ops *ops)
  {
 int ret;
 int id;
 @@ -765,7 +729,6 @@ struct phy *phy_create(struct device *dev, struct 
 device_node *node,
 phy-dev.of_node = node ?: dev-of_node;
 phy-id = id;
 phy-ops = ops;
 -   phy-init_data = init_data;

 ret = dev_set_name(phy-dev, phy-%s.%d, dev_name(dev), id);
 if (ret)
 @@ -800,7 +763,6 @@ EXPORT_SYMBOL_GPL(phy_create);
   * @dev: device that is creating the new phy
   * @node: device node of the phy
   * @ops: function pointers for performing phy operations
 - * @init_data: contains the list of PHY consumers or NULL
   *
   * Creates a new PHY device adding it to the PHY class.
   * While at that, it also associates the device with the phy using devres.
 @@ -808,8 +770,7 @@ EXPORT_SYMBOL_GPL(phy_create);
   * then, devres data is freed.
   */
  struct phy *devm_phy_create(struct device *dev, struct device_node *node,
 -

Re: [PATCH 4/6] phy: remove the old lookup method

2014-08-25 Thread Heikki Krogerus
On Mon, Aug 25, 2014 at 01:11:34PM +0530, Vivek Gautam wrote:
 Please squash the attached diff which removes the 'init_data' field
 from some of the other instances
 of devm_phy_create() in few other drivers.
 This should prevent any build errors that i could see with multi_v7_defconfig.

OK, I'll add those changes into this patch, and it seems there
is now at least one more new driver on top of those calling
devm_phy_create.


Thanks!

-- 
heikki
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 4/6] phy: remove the old lookup method

2014-08-25 Thread Vivek Gautam
On Mon, Aug 25, 2014 at 1:47 PM, Heikki Krogerus
heikki.kroge...@linux.intel.com wrote:
 On Mon, Aug 25, 2014 at 01:11:34PM +0530, Vivek Gautam wrote:
 Please squash the attached diff which removes the 'init_data' field
 from some of the other instances
 of devm_phy_create() in few other drivers.
 This should prevent any build errors that i could see with 
 multi_v7_defconfig.

 OK, I'll add those changes into this patch, and it seems there
 is now at least one more new driver on top of those calling
 devm_phy_create.

Ok, i think i just saw this on 3.17-rc1.




-- 
Best Regards
Vivek Gautam
Samsung RD Institute, Bangalore
India
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/