[v2,06/21] usb: ulpi: Use of_request_module()

Message ID 20230307165359.225361-7-miquel.raynal@bootlin.com
State New
Headers
Series nvmem: Layouts support |

Commit Message

Miquel Raynal March 7, 2023, 4:53 p.m. UTC
  There is a new helper supposed to replace of_device_request_module(),
called of_request_module(). They are both strictly equivalent, besides
the fact the latter receives a "struct device_node" directly. Use it.

Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
 drivers/usb/common/ulpi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Rob Herring March 8, 2023, 12:25 a.m. UTC | #1
On Tue, Mar 07, 2023 at 05:53:44PM +0100, Miquel Raynal wrote:
> There is a new helper supposed to replace of_device_request_module(),
> called of_request_module(). They are both strictly equivalent, besides
> the fact the latter receives a "struct device_node" directly. Use it.
> 
> Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> ---
>  drivers/usb/common/ulpi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Acked-by: Rob Herring <robh@kernel.org>
  

Patch

diff --git a/drivers/usb/common/ulpi.c b/drivers/usb/common/ulpi.c
index 60e8174686a1..6a2b69642e83 100644
--- a/drivers/usb/common/ulpi.c
+++ b/drivers/usb/common/ulpi.c
@@ -229,7 +229,7 @@  static int ulpi_read_id(struct ulpi *ulpi)
 	request_module("ulpi:v%04xp%04x", ulpi->id.vendor, ulpi->id.product);
 	return 0;
 err:
-	of_device_request_module(&ulpi->dev);
+	of_request_module(ulpi->dev.of_node);
 	return 0;
 }