]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - net/irda/irttp.c
Convert files to UTF-8 and some cleanups
[net-next-2.6.git] / net / irda / irttp.c
index 7f50832a2cd5a2349e8f76dc0dd3a2141d3a9df7..97db158c92748dfe55de4e43a0f8a3682a970db2 100644 (file)
@@ -18,7 +18,7 @@
  *     published by the Free Software Foundation; either version 2 of
  *     the License, or (at your option) any later version.
  *
- *     Neither Dag Brattli nor University of Troms admit liability nor
+ *     Neither Dag Brattli nor University of TromsΓΈ admit liability nor
  *     provide warranty for any of this software. This material is
  *     provided "AS-IS" and at no charge.
  *
@@ -109,7 +109,7 @@ int __init irttp_init(void)
  *    Called by module destruction/cleanup code
  *
  */
-void __exit irttp_cleanup(void)
+void irttp_cleanup(void)
 {
        /* Check for main structure */
        IRDA_ASSERT(irttp->magic == TTP_MAGIC, return;);
@@ -1884,25 +1884,8 @@ static const struct seq_operations irttp_seq_ops = {
 
 static int irttp_seq_open(struct inode *inode, struct file *file)
 {
-       struct seq_file *seq;
-       int rc = -ENOMEM;
-       struct irttp_iter_state *s;
-
-       s = kzalloc(sizeof(*s), GFP_KERNEL);
-       if (!s)
-               goto out;
-
-       rc = seq_open(file, &irttp_seq_ops);
-       if (rc)
-               goto out_kfree;
-
-       seq          = file->private_data;
-       seq->private = s;
-out:
-       return rc;
-out_kfree:
-       kfree(s);
-       goto out;
+       return seq_open_private(file, &irttp_seq_ops,
+                       sizeof(struct irttp_iter_state));
 }
 
 const struct file_operations irttp_seq_fops = {