Thread (153 messages) 153 messages, 15 authors, 2015-06-24

[PATCH v1 1/6] eeprom: Add a simple EEPROM framework for eeprom providers

From: broonie@kernel.org (Mark Brown)
Date: 2015-03-07 15:01:06
Also in: linux-api, linux-devicetree, lkml

On Thu, Mar 05, 2015 at 09:45:41AM +0000, Srinivas Kandagatla wrote:
+
+	return eeprom;
+}
+EXPORT_SYMBOL(eeprom_register);
This framework uses regmap but regmap is EXPORT_SYMBOL_GPL() and this is
using EXPORT_SYMBOL().
+int eeprom_unregister(struct eeprom_device *eeprom)
+{
+	mutex_lock(&eeprom_mutex);
+	if (atomic_read(&eeprom->users)) {
+		mutex_unlock(&eeprom_mutex);
Atomic reads and a mutex - isn't the mutex enough?  Atomics are
generally a recipie for bugs due to the complexity in using them.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150307/8a4486a4/attachment.sig>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help