EXPORT_SYMBOL(iomem_resource);
-static rwlock_t resource_lock = RW_LOCK_UNLOCKED;
+static DEFINE_RWLOCK(resource_lock);
#ifdef CONFIG_PROC_FS
}
static void *r_start(struct seq_file *m, loff_t *pos)
+ __acquires(resource_lock)
{
struct resource *p = m->private;
loff_t l = 0;
}
static void r_stop(struct seq_file *m, void *v)
+ __releases(resource_lock)
{
read_unlock(&resource_lock);
}
return 0;
}
-struct seq_operations resource_op = {
+static struct seq_operations resource_op = {
.start = r_start,
.next = r_next,
.stop = r_stop,
new->start = (new->start + align - 1) & ~(align - 1);
if (alignf)
alignf(alignf_data, new, size, align);
- if (new->start < new->end && new->end - new->start + 1 >= size) {
+ if (new->start < new->end && new->end - new->start >= size - 1) {
new->end = new->start + size - 1;
return 0;
}