Re: [PATCH 2/2] USB: otg/ulpi: extend id's table.

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

 



Hello.

On 10-10-2010 19:59, Igor Grinberg wrote:

Extend id's table to have ulpi phy names in it.
Report if the known phy is found.

Signed-off-by: Igor Grinberg<grinberg@xxxxxxxxxxxxxx>
---
  drivers/usb/otg/ulpi.c |   25 ++++++++++++++++++++-----
  1 files changed, 20 insertions(+), 5 deletions(-)

diff --git a/drivers/usb/otg/ulpi.c b/drivers/usb/otg/ulpi.c
index e0d2a5c..059d9ac 100644
--- a/drivers/usb/otg/ulpi.c
+++ b/drivers/usb/otg/ulpi.c
[...]
@@ -179,9 +190,13 @@ static int ulpi_init(struct otg_transceiver *otg)

  	pr_info("ULPI transceiver vendor/product ID 0x%04x/0x%04x\n", vid, pid);

-	for (i = 0; i<  ARRAY_SIZE(ulpi_ids); i++)
-		if (ulpi_ids[i] == ULPI_ID(vid, pid))
+	for (i = 0; i<  ARRAY_SIZE(ulpi_ids); i++) {
+		if (ulpi_ids[i].id == ULPI_ID(vid, pid)) {
+			pr_info("Found %s ULPI transceiver.\n",
+				ulpi_ids[i].name);
  			break;
+		}
+	}

   Note that {} for the loop are not necessary.

WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux