Re: [PATCH 1/2] extcon: fix hang and extcon_get/set_cable_state().

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

 



Hi,

On 07/07/15 15:40, Ivan T. Ivanov wrote:

On Mon, 2015-07-06 at 17:46 +0300, Roger Quadros wrote:


-static int find_cable_index_by_name(struct extcon_dev *edev, const char *name)
+static int find_cable_id_by_name(struct extcon_dev *edev, const char *name)
  {
-       unsigned int id = EXTCON_NONE;
+       unsigned int id = -EINVAL;
         int i = 0;

-       if (edev->max_supported == 0)
-               return -EINVAL;
-
-       /* Find the the number of extcon cable */
+       /* Find the id of extcon cable */
         while (extcon_name[i]) {
                 if (!strncmp(extcon_name[i], name, CABLE_NAME_MAX)) {
                         id = i;
@@ -140,6 +137,19 @@ static int find_cable_index_by_name(struct extcon_dev *edev, const char *name)
                 }
         }


Thank you Roger, but this still hang. 'i' is not incremented.

You are right. Thanks for pointing out.
I will send out a v2.


Ivan

+       return id;
+};


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



[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux