Alex Elder | e1e9dbd | 2014-10-01 21:54:11 -0500 | [diff] [blame] | 1 | /* |
Greg Kroah-Hartman | 4ab9b3c | 2014-12-19 14:56:31 -0800 | [diff] [blame] | 2 | * Greybus interface code |
Alex Elder | e1e9dbd | 2014-10-01 21:54:11 -0500 | [diff] [blame] | 3 | * |
| 4 | * Copyright 2014 Google Inc. |
Alex Elder | a46e967 | 2014-12-12 12:08:42 -0600 | [diff] [blame] | 5 | * Copyright 2014 Linaro Ltd. |
Alex Elder | e1e9dbd | 2014-10-01 21:54:11 -0500 | [diff] [blame] | 6 | * |
| 7 | * Released under the GPLv2 only. |
| 8 | */ |
| 9 | |
| 10 | #include "greybus.h" |
| 11 | |
Greg Kroah-Hartman | 4ab9b3c | 2014-12-19 14:56:31 -0800 | [diff] [blame] | 12 | /* interface sysfs attributes */ |
| 13 | #define gb_interface_attr(field, type) \ |
| 14 | static ssize_t field##_show(struct device *dev, \ |
| 15 | struct device_attribute *attr, \ |
| 16 | char *buf) \ |
Greg Kroah-Hartman | ab88eb5 | 2014-12-11 17:10:59 -0500 | [diff] [blame] | 17 | { \ |
Greg Kroah-Hartman | 4ab9b3c | 2014-12-19 14:56:31 -0800 | [diff] [blame] | 18 | struct gb_interface *intf = to_gb_interface(dev); \ |
Viresh Kumar | 2c7df74 | 2015-12-18 15:04:27 +0530 | [diff] [blame] | 19 | return scnprintf(buf, PAGE_SIZE, type"\n", intf->field); \ |
Greg Kroah-Hartman | ab88eb5 | 2014-12-11 17:10:59 -0500 | [diff] [blame] | 20 | } \ |
| 21 | static DEVICE_ATTR_RO(field) |
| 22 | |
Viresh Kumar | 0e9403a0 | 2015-12-22 22:04:34 +0530 | [diff] [blame] | 23 | gb_interface_attr(ddbl1_manufacturer_id, "0x%08x"); |
| 24 | gb_interface_attr(ddbl1_product_id, "0x%08x"); |
Viresh Kumar | 2c7df74 | 2015-12-18 15:04:27 +0530 | [diff] [blame] | 25 | gb_interface_attr(interface_id, "%u"); |
| 26 | gb_interface_attr(vendor_id, "0x%08x"); |
| 27 | gb_interface_attr(product_id, "0x%08x"); |
| 28 | gb_interface_attr(vendor_string, "%s"); |
| 29 | gb_interface_attr(product_string, "%s"); |
Viresh Kumar | 57c6bcc | 2015-12-28 11:59:00 +0530 | [diff] [blame] | 30 | gb_interface_attr(serial_number, "0x%016llx"); |
Greg Kroah-Hartman | ab88eb5 | 2014-12-11 17:10:59 -0500 | [diff] [blame] | 31 | |
Viresh Kumar | d39bf70 | 2015-12-28 11:59:01 +0530 | [diff] [blame] | 32 | static ssize_t version_show(struct device *dev, struct device_attribute *attr, |
| 33 | char *buf) |
| 34 | { |
| 35 | struct gb_interface *intf = to_gb_interface(dev); |
| 36 | |
| 37 | return scnprintf(buf, PAGE_SIZE, "%u.%u\n", intf->version_major, |
| 38 | intf->version_minor); |
| 39 | } |
| 40 | static DEVICE_ATTR_RO(version); |
| 41 | |
Greg Kroah-Hartman | 4ab9b3c | 2014-12-19 14:56:31 -0800 | [diff] [blame] | 42 | static struct attribute *interface_attrs[] = { |
Viresh Kumar | 0e9403a0 | 2015-12-22 22:04:34 +0530 | [diff] [blame] | 43 | &dev_attr_ddbl1_manufacturer_id.attr, |
| 44 | &dev_attr_ddbl1_product_id.attr, |
Johan Hovold | 320421a | 2015-11-25 15:58:58 +0100 | [diff] [blame] | 45 | &dev_attr_interface_id.attr, |
Johan Hovold | 9f59263 | 2015-11-25 15:58:56 +0100 | [diff] [blame] | 46 | &dev_attr_vendor_id.attr, |
| 47 | &dev_attr_product_id.attr, |
Greg Kroah-Hartman | ab88eb5 | 2014-12-11 17:10:59 -0500 | [diff] [blame] | 48 | &dev_attr_vendor_string.attr, |
| 49 | &dev_attr_product_string.attr, |
Viresh Kumar | 57c6bcc | 2015-12-28 11:59:00 +0530 | [diff] [blame] | 50 | &dev_attr_serial_number.attr, |
Viresh Kumar | d39bf70 | 2015-12-28 11:59:01 +0530 | [diff] [blame] | 51 | &dev_attr_version.attr, |
Greg Kroah-Hartman | ab88eb5 | 2014-12-11 17:10:59 -0500 | [diff] [blame] | 52 | NULL, |
| 53 | }; |
Greg Kroah-Hartman | 4ab9b3c | 2014-12-19 14:56:31 -0800 | [diff] [blame] | 54 | ATTRIBUTE_GROUPS(interface); |
Greg Kroah-Hartman | ab88eb5 | 2014-12-11 17:10:59 -0500 | [diff] [blame] | 55 | |
| 56 | |
Alex Elder | e1e9dbd | 2014-10-01 21:54:11 -0500 | [diff] [blame] | 57 | /* XXX This could be per-host device */ |
Greg Kroah-Hartman | 4901175 | 2014-12-19 14:56:37 -0800 | [diff] [blame] | 58 | static DEFINE_SPINLOCK(gb_interfaces_lock); |
Alex Elder | e1e9dbd | 2014-10-01 21:54:11 -0500 | [diff] [blame] | 59 | |
Greg Kroah-Hartman | df67155 | 2014-12-21 14:10:26 -0800 | [diff] [blame] | 60 | // FIXME, odds are you don't want to call this function, rework the caller to |
| 61 | // not need it please. |
Johan Hovold | 2537636 | 2015-11-03 18:03:23 +0100 | [diff] [blame] | 62 | struct gb_interface *gb_interface_find(struct gb_host_device *hd, |
Viresh Kumar | c9d9d0d | 2015-04-01 20:31:58 +0530 | [diff] [blame] | 63 | u8 interface_id) |
Viresh Kumar | 9ca4d62 | 2014-11-14 17:25:06 +0530 | [diff] [blame] | 64 | { |
Greg Kroah-Hartman | 4ab9b3c | 2014-12-19 14:56:31 -0800 | [diff] [blame] | 65 | struct gb_interface *intf; |
Viresh Kumar | 9ca4d62 | 2014-11-14 17:25:06 +0530 | [diff] [blame] | 66 | |
Greg Kroah-Hartman | 1cd56a8 | 2014-12-19 14:56:36 -0800 | [diff] [blame] | 67 | list_for_each_entry(intf, &hd->interfaces, links) |
Viresh Kumar | c9d9d0d | 2015-04-01 20:31:58 +0530 | [diff] [blame] | 68 | if (intf->interface_id == interface_id) |
Greg Kroah-Hartman | 4ab9b3c | 2014-12-19 14:56:31 -0800 | [diff] [blame] | 69 | return intf; |
Viresh Kumar | 9ca4d62 | 2014-11-14 17:25:06 +0530 | [diff] [blame] | 70 | |
| 71 | return NULL; |
| 72 | } |
| 73 | |
Viresh Kumar | 51b5d8d | 2015-05-20 17:33:51 +0530 | [diff] [blame] | 74 | static void gb_interface_release(struct device *dev) |
Alex Elder | 697e55d | 2014-10-20 23:01:04 -0500 | [diff] [blame] | 75 | { |
Greg Kroah-Hartman | 4ab9b3c | 2014-12-19 14:56:31 -0800 | [diff] [blame] | 76 | struct gb_interface *intf = to_gb_interface(dev); |
Alex Elder | 697e55d | 2014-10-20 23:01:04 -0500 | [diff] [blame] | 77 | |
Johan Hovold | eeb6a6f | 2015-11-11 10:07:05 +0100 | [diff] [blame] | 78 | kfree(intf->product_string); |
| 79 | kfree(intf->vendor_string); |
| 80 | |
Johan Hovold | c634650 | 2015-12-15 15:28:56 +0100 | [diff] [blame] | 81 | if (intf->control) |
| 82 | gb_control_destroy(intf->control); |
| 83 | |
Greg Kroah-Hartman | 4ab9b3c | 2014-12-19 14:56:31 -0800 | [diff] [blame] | 84 | kfree(intf); |
Alex Elder | 697e55d | 2014-10-20 23:01:04 -0500 | [diff] [blame] | 85 | } |
| 86 | |
Greg Kroah-Hartman | 4ab9b3c | 2014-12-19 14:56:31 -0800 | [diff] [blame] | 87 | struct device_type greybus_interface_type = { |
| 88 | .name = "greybus_interface", |
Viresh Kumar | 51b5d8d | 2015-05-20 17:33:51 +0530 | [diff] [blame] | 89 | .release = gb_interface_release, |
Greg Kroah-Hartman | f0f61b9 | 2014-10-24 17:34:46 +0800 | [diff] [blame] | 90 | }; |
| 91 | |
Alex Elder | e1e9dbd | 2014-10-01 21:54:11 -0500 | [diff] [blame] | 92 | /* |
Bryan O'Donoghue | 464dc8c | 2015-08-17 00:57:16 +0100 | [diff] [blame] | 93 | * A Greybus module represents a user-replaceable component on an Ara |
Greg Kroah-Hartman | 4ab9b3c | 2014-12-19 14:56:31 -0800 | [diff] [blame] | 94 | * phone. An interface is the physical connection on that module. A |
| 95 | * module may have more than one interface. |
Alex Elder | e1e9dbd | 2014-10-01 21:54:11 -0500 | [diff] [blame] | 96 | * |
Viresh Kumar | c9d9d0d | 2015-04-01 20:31:58 +0530 | [diff] [blame] | 97 | * Create a gb_interface structure to represent a discovered interface. |
| 98 | * The position of interface within the Endo is encoded in "interface_id" |
| 99 | * argument. |
| 100 | * |
Greg Kroah-Hartman | df67155 | 2014-12-21 14:10:26 -0800 | [diff] [blame] | 101 | * Returns a pointer to the new interfce or a null pointer if a |
Alex Elder | e1e9dbd | 2014-10-01 21:54:11 -0500 | [diff] [blame] | 102 | * failure occurs due to memory exhaustion. |
| 103 | */ |
Johan Hovold | 2537636 | 2015-11-03 18:03:23 +0100 | [diff] [blame] | 104 | struct gb_interface *gb_interface_create(struct gb_host_device *hd, |
Viresh Kumar | 6c68da2 | 2015-06-22 16:42:27 +0530 | [diff] [blame] | 105 | u8 interface_id) |
Alex Elder | e1e9dbd | 2014-10-01 21:54:11 -0500 | [diff] [blame] | 106 | { |
Greg Kroah-Hartman | 4ab9b3c | 2014-12-19 14:56:31 -0800 | [diff] [blame] | 107 | struct gb_interface *intf; |
Alex Elder | e1e9dbd | 2014-10-01 21:54:11 -0500 | [diff] [blame] | 108 | |
Greg Kroah-Hartman | 4ab9b3c | 2014-12-19 14:56:31 -0800 | [diff] [blame] | 109 | intf = kzalloc(sizeof(*intf), GFP_KERNEL); |
| 110 | if (!intf) |
Johan Hovold | 8b0df4b | 2015-11-25 15:59:04 +0100 | [diff] [blame] | 111 | return NULL; |
Alex Elder | e1e9dbd | 2014-10-01 21:54:11 -0500 | [diff] [blame] | 112 | |
Greg Kroah-Hartman | 4ab9b3c | 2014-12-19 14:56:31 -0800 | [diff] [blame] | 113 | intf->hd = hd; /* XXX refcount? */ |
Viresh Kumar | c9d9d0d | 2015-04-01 20:31:58 +0530 | [diff] [blame] | 114 | intf->interface_id = interface_id; |
Greg Kroah-Hartman | 4ab9b3c | 2014-12-19 14:56:31 -0800 | [diff] [blame] | 115 | INIT_LIST_HEAD(&intf->bundles); |
Greg Kroah-Hartman | 86cad66 | 2014-12-23 15:16:50 -0800 | [diff] [blame] | 116 | INIT_LIST_HEAD(&intf->manifest_descs); |
Alex Elder | e1e9dbd | 2014-10-01 21:54:11 -0500 | [diff] [blame] | 117 | |
Viresh Kumar | c3add78 | 2015-07-01 12:13:58 +0530 | [diff] [blame] | 118 | /* Invalid device id to start with */ |
| 119 | intf->device_id = GB_DEVICE_ID_BAD; |
| 120 | |
Johan Hovold | 8b0df4b | 2015-11-25 15:59:04 +0100 | [diff] [blame] | 121 | intf->dev.parent = &hd->dev; |
Greg Kroah-Hartman | 4ab9b3c | 2014-12-19 14:56:31 -0800 | [diff] [blame] | 122 | intf->dev.bus = &greybus_bus_type; |
| 123 | intf->dev.type = &greybus_interface_type; |
| 124 | intf->dev.groups = interface_groups; |
Johan Hovold | 2adaefb | 2015-11-25 15:59:02 +0100 | [diff] [blame] | 125 | intf->dev.dma_mask = hd->dev.dma_mask; |
Greg Kroah-Hartman | 4ab9b3c | 2014-12-19 14:56:31 -0800 | [diff] [blame] | 126 | device_initialize(&intf->dev); |
Johan Hovold | 8b0df4b | 2015-11-25 15:59:04 +0100 | [diff] [blame] | 127 | dev_set_name(&intf->dev, "%d-%d", hd->bus_id, interface_id); |
Greg Kroah-Hartman | f0f61b9 | 2014-10-24 17:34:46 +0800 | [diff] [blame] | 128 | |
Johan Hovold | c634650 | 2015-12-15 15:28:56 +0100 | [diff] [blame] | 129 | intf->control = gb_control_create(intf); |
| 130 | if (!intf->control) { |
| 131 | put_device(&intf->dev); |
| 132 | return NULL; |
| 133 | } |
| 134 | |
Greg Kroah-Hartman | 4901175 | 2014-12-19 14:56:37 -0800 | [diff] [blame] | 135 | spin_lock_irq(&gb_interfaces_lock); |
Viresh Kumar | 928f2ab | 2015-06-04 18:16:45 +0530 | [diff] [blame] | 136 | list_add(&intf->links, &hd->interfaces); |
Greg Kroah-Hartman | 4901175 | 2014-12-19 14:56:37 -0800 | [diff] [blame] | 137 | spin_unlock_irq(&gb_interfaces_lock); |
Viresh Kumar | 0a68a16 | 2014-11-13 18:14:37 +0530 | [diff] [blame] | 138 | |
Greg Kroah-Hartman | 4ab9b3c | 2014-12-19 14:56:31 -0800 | [diff] [blame] | 139 | return intf; |
Alex Elder | e1e9dbd | 2014-10-01 21:54:11 -0500 | [diff] [blame] | 140 | } |
| 141 | |
| 142 | /* |
Johan Hovold | febe252 | 2015-11-11 10:07:06 +0100 | [diff] [blame] | 143 | * Tear down a previously set up interface. |
Alex Elder | e1e9dbd | 2014-10-01 21:54:11 -0500 | [diff] [blame] | 144 | */ |
Viresh Kumar | 80d1ede | 2015-09-23 16:48:10 -0700 | [diff] [blame] | 145 | void gb_interface_remove(struct gb_interface *intf) |
Alex Elder | e1e9dbd | 2014-10-01 21:54:11 -0500 | [diff] [blame] | 146 | { |
Alex Elder | fe53b45 | 2015-06-12 10:21:11 -0500 | [diff] [blame] | 147 | struct gb_bundle *bundle; |
| 148 | struct gb_bundle *next; |
Viresh Kumar | 2352a73 | 2015-04-02 17:53:47 +0530 | [diff] [blame] | 149 | |
Johan Hovold | 141af4f | 2015-12-15 15:28:57 +0100 | [diff] [blame] | 150 | if (intf->disconnected) |
| 151 | gb_control_disable(intf->control); |
| 152 | |
Alex Elder | fe53b45 | 2015-06-12 10:21:11 -0500 | [diff] [blame] | 153 | list_for_each_entry_safe(bundle, next, &intf->bundles, links) |
| 154 | gb_bundle_destroy(bundle); |
Alex Elder | 697e55d | 2014-10-20 23:01:04 -0500 | [diff] [blame] | 155 | |
Johan Hovold | ab66dd7 | 2015-12-07 15:05:45 +0100 | [diff] [blame] | 156 | if (device_is_registered(&intf->dev)) |
| 157 | device_del(&intf->dev); |
| 158 | |
Johan Hovold | c634650 | 2015-12-15 15:28:56 +0100 | [diff] [blame] | 159 | gb_control_disable(intf->control); |
Johan Hovold | 47091af | 2015-11-25 15:59:26 +0100 | [diff] [blame] | 160 | |
Johan Hovold | ab66dd7 | 2015-12-07 15:05:45 +0100 | [diff] [blame] | 161 | spin_lock_irq(&gb_interfaces_lock); |
| 162 | list_del(&intf->links); |
| 163 | spin_unlock_irq(&gb_interfaces_lock); |
| 164 | |
| 165 | put_device(&intf->dev); |
Alex Elder | 574341c | 2014-10-16 06:35:35 -0500 | [diff] [blame] | 166 | } |
| 167 | |
Johan Hovold | 2537636 | 2015-11-03 18:03:23 +0100 | [diff] [blame] | 168 | void gb_interfaces_remove(struct gb_host_device *hd) |
Viresh Kumar | 80d1ede | 2015-09-23 16:48:10 -0700 | [diff] [blame] | 169 | { |
| 170 | struct gb_interface *intf, *temp; |
| 171 | |
| 172 | list_for_each_entry_safe(intf, temp, &hd->interfaces, links) |
| 173 | gb_interface_remove(intf); |
| 174 | } |
| 175 | |
Viresh Kumar | 676daaf | 2014-11-14 17:25:07 +0530 | [diff] [blame] | 176 | /** |
Viresh Kumar | b950dc2 | 2015-07-03 17:00:26 +0530 | [diff] [blame] | 177 | * gb_interface_init |
Viresh Kumar | 676daaf | 2014-11-14 17:25:07 +0530 | [diff] [blame] | 178 | * |
Viresh Kumar | 6c68da2 | 2015-06-22 16:42:27 +0530 | [diff] [blame] | 179 | * Create connection for control CPort and then request/parse manifest. |
| 180 | * Finally initialize all the bundles to set routes via SVC and initialize all |
| 181 | * connections. |
Viresh Kumar | 676daaf | 2014-11-14 17:25:07 +0530 | [diff] [blame] | 182 | */ |
Viresh Kumar | 6c68da2 | 2015-06-22 16:42:27 +0530 | [diff] [blame] | 183 | int gb_interface_init(struct gb_interface *intf, u8 device_id) |
Viresh Kumar | 676daaf | 2014-11-14 17:25:07 +0530 | [diff] [blame] | 184 | { |
Johan Hovold | 708d07a | 2015-12-07 15:05:44 +0100 | [diff] [blame] | 185 | struct gb_bundle *bundle, *tmp; |
Johan Hovold | 47091af | 2015-11-25 15:59:26 +0100 | [diff] [blame] | 186 | struct gb_connection *connection; |
Viresh Kumar | 6c68da2 | 2015-06-22 16:42:27 +0530 | [diff] [blame] | 187 | int ret, size; |
| 188 | void *manifest; |
Viresh Kumar | 676daaf | 2014-11-14 17:25:07 +0530 | [diff] [blame] | 189 | |
Viresh Kumar | c3add78 | 2015-07-01 12:13:58 +0530 | [diff] [blame] | 190 | intf->device_id = device_id; |
| 191 | |
Johan Hovold | c634650 | 2015-12-15 15:28:56 +0100 | [diff] [blame] | 192 | /* Establish control connection */ |
| 193 | ret = gb_control_enable(intf->control); |
| 194 | if (ret) |
Johan Hovold | 0bf1f24 | 2015-12-07 15:05:34 +0100 | [diff] [blame] | 195 | return ret; |
Johan Hovold | 0bf1f24 | 2015-12-07 15:05:34 +0100 | [diff] [blame] | 196 | |
Viresh Kumar | 6c68da2 | 2015-06-22 16:42:27 +0530 | [diff] [blame] | 197 | /* Get manifest size using control protocol on CPort */ |
| 198 | size = gb_control_get_manifest_size_operation(intf); |
| 199 | if (size <= 0) { |
Johan Hovold | 5626e0b | 2015-12-07 15:05:46 +0100 | [diff] [blame] | 200 | dev_err(&intf->dev, "failed to get manifest size: %d\n", size); |
Viresh Kumar | 6c68da2 | 2015-06-22 16:42:27 +0530 | [diff] [blame] | 201 | if (size) |
| 202 | return size; |
| 203 | else |
| 204 | return -EINVAL; |
| 205 | } |
| 206 | |
| 207 | manifest = kmalloc(size, GFP_KERNEL); |
| 208 | if (!manifest) |
| 209 | return -ENOMEM; |
| 210 | |
| 211 | /* Get manifest using control protocol on CPort */ |
| 212 | ret = gb_control_get_manifest_operation(intf, manifest, size); |
| 213 | if (ret) { |
Johan Hovold | 5626e0b | 2015-12-07 15:05:46 +0100 | [diff] [blame] | 214 | dev_err(&intf->dev, "failed to get manifest: %d\n", ret); |
Viresh Kumar | 6c68da2 | 2015-06-22 16:42:27 +0530 | [diff] [blame] | 215 | goto free_manifest; |
Viresh Kumar | 676daaf | 2014-11-14 17:25:07 +0530 | [diff] [blame] | 216 | } |
| 217 | |
| 218 | /* |
Viresh Kumar | 6c68da2 | 2015-06-22 16:42:27 +0530 | [diff] [blame] | 219 | * Parse the manifest and build up our data structures representing |
| 220 | * what's in it. |
Viresh Kumar | 676daaf | 2014-11-14 17:25:07 +0530 | [diff] [blame] | 221 | */ |
Viresh Kumar | 6c68da2 | 2015-06-22 16:42:27 +0530 | [diff] [blame] | 222 | if (!gb_manifest_parse(intf, manifest, size)) { |
Johan Hovold | 5626e0b | 2015-12-07 15:05:46 +0100 | [diff] [blame] | 223 | dev_err(&intf->dev, "failed to parse manifest\n"); |
Viresh Kumar | 6c68da2 | 2015-06-22 16:42:27 +0530 | [diff] [blame] | 224 | ret = -EINVAL; |
| 225 | goto free_manifest; |
Viresh Kumar | 676daaf | 2014-11-14 17:25:07 +0530 | [diff] [blame] | 226 | } |
| 227 | |
Viresh Kumar | d39bf70 | 2015-12-28 11:59:01 +0530 | [diff] [blame] | 228 | ret = gb_control_get_interface_version_operation(intf); |
| 229 | if (ret) |
| 230 | goto free_manifest; |
| 231 | |
Johan Hovold | ab66dd7 | 2015-12-07 15:05:45 +0100 | [diff] [blame] | 232 | /* Register the interface and its bundles. */ |
| 233 | ret = device_add(&intf->dev); |
| 234 | if (ret) { |
| 235 | dev_err(&intf->dev, "failed to register interface: %d\n", ret); |
| 236 | goto free_manifest; |
| 237 | } |
| 238 | |
Johan Hovold | 708d07a | 2015-12-07 15:05:44 +0100 | [diff] [blame] | 239 | list_for_each_entry_safe_reverse(bundle, tmp, &intf->bundles, links) { |
| 240 | ret = gb_bundle_add(bundle); |
| 241 | if (ret) { |
| 242 | gb_bundle_destroy(bundle); |
| 243 | continue; |
| 244 | } |
| 245 | |
| 246 | list_for_each_entry(connection, &bundle->connections, |
| 247 | bundle_links) { |
| 248 | ret = gb_connection_init(connection); |
| 249 | if (ret) |
| 250 | break; |
| 251 | } |
| 252 | if (ret) |
| 253 | gb_bundle_destroy(bundle); |
| 254 | } |
| 255 | |
| 256 | ret = 0; |
Viresh Kumar | 676daaf | 2014-11-14 17:25:07 +0530 | [diff] [blame] | 257 | |
Viresh Kumar | 6c68da2 | 2015-06-22 16:42:27 +0530 | [diff] [blame] | 258 | free_manifest: |
| 259 | kfree(manifest); |
| 260 | return ret; |
Viresh Kumar | 676daaf | 2014-11-14 17:25:07 +0530 | [diff] [blame] | 261 | } |