Thread (14 messages) 14 messages, 4 authors, 2013-08-01

[RESEND PATCH v10 1/8] drivers: phy: add generic PHY framework

flat view

From: gregkh@linuxfoundation.org (Greg KH)
Date: 2013-08-01 07:30:47
Also in: linux-fbdev, linux-media, linux-omap, linux-samsung-soc, lkml

On Fri, Jul 26, 2013 at 06:19:16PM +0530, Kishon Vijay Abraham I wrote:
quoted hunk ↗ jump to hunk
+static int phy_get_id(void)
+{
+	int ret;
+	int id;
+
+	ret = ida_pre_get(&phy_ida, GFP_KERNEL);
+	if (!ret)
+		return -ENOMEM;
+
+	ret = ida_get_new(&phy_ida, &id);
+	if (ret < 0)
+		return ret;
+
+	return id;
+}
ida_simple_get() instead?  And if you do that, you can get rid of this
function entirely.

thanks,

greg k-h
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help