projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'for-linus' of git://www.atmel.no/~hskinnemoen/linux/kernel/avr32
[powerpc.git]
/
net
/
irda
/
irlap.c
diff --git
a/net/irda/irlap.c
b/net/irda/irlap.c
index
cade355
..
d93ebd1
100644
(file)
--- a/
net/irda/irlap.c
+++ b/
net/irda/irlap.c
@@
-87,7
+87,7
@@
int __init irlap_init(void)
/* Allocate master array */
irlap = hashbin_new(HB_LOCK);
if (irlap == NULL) {
/* Allocate master array */
irlap = hashbin_new(HB_LOCK);
if (irlap == NULL) {
- IRDA_ERROR("%s: can't allocate irlap hashbin!\n",
+ IRDA_ERROR("%s: can't allocate irlap hashbin!\n",
__FUNCTION__);
return -ENOMEM;
}
__FUNCTION__);
return -ENOMEM;
}
@@
-116,11
+116,10
@@
struct irlap_cb *irlap_open(struct net_device *dev, struct qos_info *qos,
IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
/* Initialize the irlap structure. */
IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
/* Initialize the irlap structure. */
- self = k
m
alloc(sizeof(struct irlap_cb), GFP_KERNEL);
+ self = k
z
alloc(sizeof(struct irlap_cb), GFP_KERNEL);
if (self == NULL)
return NULL;
if (self == NULL)
return NULL;
- memset(self, 0, sizeof(struct irlap_cb));
self->magic = LAP_MAGIC;
/* Make a binding between the layers */
self->magic = LAP_MAGIC;
/* Make a binding between the layers */
@@
-702,8
+701,8
@@
void irlap_update_nr_received(struct irlap_cb *self, int nr)
int count = 0;
/*
int count = 0;
/*
-
* Remove all the ack-ed frames from the window queue.
-
*/
+ * Remove all the ack-ed frames from the window queue.
+ */
/*
* Optimize for the common case. It is most likely that the receiver
/*
* Optimize for the common case. It is most likely that the receiver
@@
-882,7
+881,7
@@
static void irlap_change_speed(struct irlap_cb *self, __u32 speed, int now)
/* Change speed now, or just piggyback speed on frames */
if (now) {
/* Send down empty frame to trigger speed change */
/* Change speed now, or just piggyback speed on frames */
if (now) {
/* Send down empty frame to trigger speed change */
- skb =
dev_alloc_skb(0
);
+ skb =
alloc_skb(0, GFP_ATOMIC
);
if (skb)
irlap_queue_xmit(self, skb);
}
if (skb)
irlap_queue_xmit(self, skb);
}
@@
-1110,13
+1109,13
@@
static void *irlap_seq_start(struct seq_file *seq, loff_t *pos)
spin_lock_irq(&irlap->hb_spinlock);
iter->id = 0;
spin_lock_irq(&irlap->hb_spinlock);
iter->id = 0;
- for (self = (struct irlap_cb *) hashbin_get_first(irlap);
+ for (self = (struct irlap_cb *) hashbin_get_first(irlap);
self; self = (struct irlap_cb *) hashbin_get_next(irlap)) {
if (iter->id == *pos)
break;
++iter->id;
}
self; self = (struct irlap_cb *) hashbin_get_next(irlap)) {
if (iter->id == *pos)
break;
++iter->id;
}
-
+
return self;
}
return self;
}
@@
-1138,7
+1137,7
@@
static int irlap_seq_show(struct seq_file *seq, void *v)
{
const struct irlap_iter_state *iter = seq->private;
const struct irlap_cb *self = v;
{
const struct irlap_iter_state *iter = seq->private;
const struct irlap_cb *self = v;
-
+
IRDA_ASSERT(self->magic == LAP_MAGIC, return -EINVAL;);
seq_printf(seq, "irlap%d ", iter->id);
IRDA_ASSERT(self->magic == LAP_MAGIC, return -EINVAL;);
seq_printf(seq, "irlap%d ", iter->id);
@@
-1222,8
+1221,8
@@
static int irlap_seq_open(struct inode *inode, struct file *file)
{
struct seq_file *seq;
int rc = -ENOMEM;
{
struct seq_file *seq;
int rc = -ENOMEM;
- struct irlap_iter_state *s = k
m
alloc(sizeof(*s), GFP_KERNEL);
-
+ struct irlap_iter_state *s = k
z
alloc(sizeof(*s), GFP_KERNEL);
+
if (!s)
goto out;
if (!s)
goto out;
@@
-1238,7
+1237,6
@@
static int irlap_seq_open(struct inode *inode, struct file *file)
seq = file->private_data;
seq->private = s;
seq = file->private_data;
seq->private = s;
- memset(s, 0, sizeof(*s));
out:
return rc;
out_kfree:
out:
return rc;
out_kfree:
@@
-1246,7
+1244,7
@@
out_kfree:
goto out;
}
goto out;
}
-struct file_operations irlap_seq_fops = {
+
const
struct file_operations irlap_seq_fops = {
.owner = THIS_MODULE,
.open = irlap_seq_open,
.read = seq_read,
.owner = THIS_MODULE,
.open = irlap_seq_open,
.read = seq_read,