Thread (14 messages) read the whole thread 14 messages, 4 authors, 2013-08-01

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

From: Greg KH <gregkh@linuxfoundation.org>
Date: 2013-08-01 07:30:47
Also in: linux-arm-kernel, linux-media, linux-omap, linux-samsung-soc, lkml

On Fri, Jul 26, 2013 at 06:19:16PM +0530, Kishon Vijay Abraham I wrote:
+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