}
#ifdef CONFIG_PROC_FS
-struct discovery_iter_state {
- unsigned long flags;
-};
-
static inline discovery_t *discovery_seq_idx(loff_t pos)
{
static void *discovery_seq_start(struct seq_file *seq, loff_t *pos)
{
- struct discovery_iter_state *iter = seq->private;
-
- spin_lock_irqsave(&irlmp->cachelog->hb_spinlock, iter->flags);
+ spin_lock_irq(&irlmp->cachelog->hb_spinlock);
return *pos ? discovery_seq_idx(*pos - 1) : SEQ_START_TOKEN;
}
static void discovery_seq_stop(struct seq_file *seq, void *v)
{
- struct discovery_iter_state *iter = seq->private;
- spin_unlock_irqrestore(&irlmp->cachelog->hb_spinlock, iter->flags);
+ spin_unlock_irq(&irlmp->cachelog->hb_spinlock);
}
static int discovery_seq_show(struct seq_file *seq, void *v)
static int discovery_seq_open(struct inode *inode, struct file *file)
{
- struct seq_file *seq;
- int rc = -ENOMEM;
- struct discovery_iter_state *s;
-
ASSERT(irlmp != NULL, return -EINVAL;);
- s = kmalloc(sizeof(*s), GFP_KERNEL);
- if (!s)
- goto out;
-
- rc = seq_open(file, &discovery_seq_ops);
- if (rc)
- goto out_kfree;
-
- seq = file->private_data;
- seq->private = s;
- memset(s, 0, sizeof(*s));
-out:
- return rc;
-out_kfree:
- kfree(s);
- goto out;
+ return seq_open(file, &discovery_seq_ops);
}
struct file_operations discovery_seq_fops = {
EXPORT_SYMBOL(ircomm_flow_request);
#ifdef CONFIG_PROC_FS
-struct ircomm_iter_state {
- unsigned long flags;
-};
-
static void *ircomm_seq_start(struct seq_file *seq, loff_t *pos)
{
- struct ircomm_iter_state *iter = seq->private;
struct ircomm_cb *self;
loff_t off = 0;
- spin_lock_irqsave(&ircomm->hb_spinlock, iter->flags);
+ spin_lock_irq(&ircomm->hb_spinlock);
for (self = (struct ircomm_cb *) hashbin_get_first(ircomm);
self != NULL;
static void ircomm_seq_stop(struct seq_file *seq, void *v)
{
- struct ircomm_iter_state *iter = seq->private;
- spin_unlock_irqrestore(&ircomm->hb_spinlock, iter->flags);
+ spin_unlock_irq(&ircomm->hb_spinlock);
}
static int ircomm_seq_show(struct seq_file *seq, void *v)
static int ircomm_seq_open(struct inode *inode, struct file *file)
{
- struct seq_file *seq;
- int rc = -ENOMEM;
- struct ircomm_iter_state *s = kmalloc(sizeof(*s), GFP_KERNEL);
-
- if (!s)
- goto out;
-
- rc = seq_open(file, &ircomm_seq_ops);
- if (rc)
- goto out_kfree;
-
- seq = file->private_data;
- seq->private = s;
- memset(s, 0, sizeof(*s));
-out:
- return rc;
-out_kfree:
- kfree(s);
- goto out;
+ return seq_open(file, &ircomm_seq_ops);
}
#endif /* CONFIG_PROC_FS */
"IAS_STRING"
};
-struct irias_iter_state {
- unsigned long flags;
-};
-
static inline struct ias_object *irias_seq_idx(loff_t pos)
{
struct ias_object *obj;
static void *irias_seq_start(struct seq_file *seq, loff_t *pos)
{
- struct irias_iter_state *iter = seq->private;
-
- spin_lock_irqsave(&irias_objects->hb_spinlock, iter->flags);
+ spin_lock_irq(&irias_objects->hb_spinlock);
return *pos ? irias_seq_idx(*pos - 1) : SEQ_START_TOKEN;
}
static void irias_seq_stop(struct seq_file *seq, void *v)
{
- struct irias_iter_state *iter = seq->private;
-
- spin_unlock_irqrestore(&irias_objects->hb_spinlock, iter->flags);
+ spin_unlock_irq(&irias_objects->hb_spinlock);
}
static int irias_seq_show(struct seq_file *seq, void *v)
static int irias_seq_open(struct inode *inode, struct file *file)
{
- struct seq_file *seq;
- int rc = -ENOMEM;
- struct irias_iter_state *s;
-
ASSERT( irias_objects != NULL, return -EINVAL;);
- s = kmalloc(sizeof(*s), GFP_KERNEL);
- if (!s)
- goto out;
- rc = seq_open(file, &irias_seq_ops);
- if (rc)
- goto out_kfree;
- seq = file->private_data;
- seq->private = s;
- memset(s, 0, sizeof(*s));
-out:
- return rc;
-out_kfree:
- kfree(s);
- goto out;
+ return seq_open(file, &irias_seq_ops);
}
struct file_operations irias_seq_fops = {
#ifdef CONFIG_PROC_FS
struct irlap_iter_state {
int id;
- unsigned long flags;
};
static void *irlap_seq_start(struct seq_file *seq, loff_t *pos)
struct irlap_cb *self;
/* Protect our access to the tsap list */
- spin_lock_irqsave(&irlap->hb_spinlock, iter->flags);
+ spin_lock_irq(&irlap->hb_spinlock);
iter->id = 0;
for (self = (struct irlap_cb *) hashbin_get_first(irlap);
static void irlap_seq_stop(struct seq_file *seq, void *v)
{
- struct irlap_iter_state *iter = seq->private;
- spin_unlock_irqrestore(&irlap->hb_spinlock, iter->flags);
+ spin_unlock_irq(&irlap->hb_spinlock);
}
static int irlap_seq_show(struct seq_file *seq, void *v)
#ifdef CONFIG_PROC_FS
struct irlmp_iter_state {
- unsigned long flags;
hashbin_t *hashbin;
};
{
void *element;
- spin_lock_irqsave(&iter->hashbin->hb_spinlock, iter->flags);
+ spin_lock_irq(&iter->hashbin->hb_spinlock);
for (element = hashbin_get_first(iter->hashbin);
element != NULL;
element = hashbin_get_next(iter->hashbin)) {
return element;
}
}
- spin_unlock_irqrestore(&iter->hashbin->hb_spinlock, iter->flags);
+ spin_unlock_irq(&iter->hashbin->hb_spinlock);
iter->hashbin = NULL;
return NULL;
}
v = hashbin_get_next(iter->hashbin);
if (v == NULL) { /* no more in this hash bin */
- spin_unlock_irqrestore(&iter->hashbin->hb_spinlock,
- iter->flags);
+ spin_unlock_irq(&iter->hashbin->hb_spinlock);
if (iter->hashbin == irlmp->unconnected_lsaps)
v = LINK_START_TOKEN;
static void irlmp_seq_stop(struct seq_file *seq, void *v)
{
struct irlmp_iter_state *iter = seq->private;
-
+
if (iter->hashbin)
- spin_unlock_irqrestore(&iter->hashbin->hb_spinlock, iter->flags);
-
+ spin_unlock_irq(&iter->hashbin->hb_spinlock);
}
static int irlmp_seq_show(struct seq_file *seq, void *v)
#ifdef CONFIG_PROC_FS
struct irttp_iter_state {
int id;
- unsigned long flags;
};
static void *irttp_seq_start(struct seq_file *seq, loff_t *pos)
struct tsap_cb *self;
/* Protect our access to the tsap list */
- spin_lock_irqsave(&irttp->tsaps->hb_spinlock, iter->flags);
+ spin_lock_irq(&irttp->tsaps->hb_spinlock);
iter->id = 0;
for (self = (struct tsap_cb *) hashbin_get_first(irttp->tsaps);
static void irttp_seq_stop(struct seq_file *seq, void *v)
{
- struct irttp_iter_state *iter = seq->private;
- spin_unlock_irqrestore(&irttp->tsaps->hb_spinlock, iter->flags);
+ spin_unlock_irq(&irttp->tsaps->hb_spinlock);
}
static int irttp_seq_show(struct seq_file *seq, void *v)