Skip to contentSkip to conversation

drivers/isdn/gigaset/common.c: small cleanups

PATCH In review Adrian Bunk 2 participants 2 messages Apr 4, 2006 – Apr 5, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/isdn/gigaset/common.c: small cleanups

This patch contains the following cleanups:
- makethe needlessly global gigaset_get_cs_by_tty() static
- remove the unused EXPORT_SYMBOL_GPL(gigaset_debugdrivers)

---

 drivers/isdn/gigaset/common.c  |   17 ++++++++---------
 drivers/isdn/gigaset/gigaset.h |    1 -
 2 files changed, 8 insertions(+), 10 deletions(-)
drivers/isdn/gigaset/gigaset.h renamed from drivers/isdn/gigaset/gigaset.h.old +0 -1
@@ -754,7 +754,6 @@
 /* Deallocate driver structure. */
 void gigaset_freedriver(struct gigaset_driver *drv);
 void gigaset_debugdrivers(void);
-struct cardstate *gigaset_get_cs_by_minor(unsigned minor);
 struct cardstate *gigaset_get_cs_by_tty(struct tty_struct *tty);
 struct cardstate *gigaset_get_cs_by_id(int id);
 
drivers/isdn/gigaset/common.c renamed from drivers/isdn/gigaset/common.c.old +8 -9
@@ -962,16 +962,8 @@
 	}
 	spin_unlock_irqrestore(&driver_lock, flags);
 }
-EXPORT_SYMBOL_GPL(gigaset_debugdrivers);
 
-struct cardstate *gigaset_get_cs_by_tty(struct tty_struct *tty)
-{
-	if (tty->index < 0 || tty->index >= tty->driver->num)
-		return NULL;
-	return gigaset_get_cs_by_minor(tty->index + tty->driver->minor_start);
-}
-
-struct cardstate *gigaset_get_cs_by_minor(unsigned minor)
+static struct cardstate *gigaset_get_cs_by_minor(unsigned minor)
 {
 	unsigned long flags;
 	static struct cardstate *ret = NULL;
@@ -994,6 +986,13 @@
 	return ret;
 }
 
+struct cardstate *gigaset_get_cs_by_tty(struct tty_struct *tty)
+{
+	if (tty->index < 0 || tty->index >= tty->driver->num)
+		return NULL;
+	return gigaset_get_cs_by_minor(tty->index + tty->driver->minor_start);
+}
+
 void gigaset_freedriver(struct gigaset_driver *drv)
 {
 	unsigned long flags;
Acked-by on v1 1/1
#1 lore raw
Quoted 3 lines · Adrian Bunk

This patch contains the following cleanups:
- makethe needlessly global gigaset_get_cs_by_tty() static
- remove the unused EXPORT_SYMBOL_GPL(gigaset_debugdrivers)

Thanks for catching these.

Quoted 1 line
Quoted 42 lines

---

 drivers/isdn/gigaset/common.c  |   17 ++++++++---------
 drivers/isdn/gigaset/gigaset.h |    1 -
 2 files changed, 8 insertions(+), 10 deletions(-)
drivers/isdn/gigaset/gigaset.h renamed from drivers/isdn/gigaset/gigaset.h.old +0 -1
@@ -754,7 +754,6 @@
 /* Deallocate driver structure. */
 void gigaset_freedriver(struct gigaset_driver *drv);
 void gigaset_debugdrivers(void);
-struct cardstate *gigaset_get_cs_by_minor(unsigned minor);
 struct cardstate *gigaset_get_cs_by_tty(struct tty_struct *tty);
 struct cardstate *gigaset_get_cs_by_id(int id);
 
drivers/isdn/gigaset/common.c renamed from drivers/isdn/gigaset/common.c.old +1 -9
@@ -962,16 +962,8 @@
 	}
 	spin_unlock_irqrestore(&driver_lock, flags);
 }
-EXPORT_SYMBOL_GPL(gigaset_debugdrivers);
 
-struct cardstate *gigaset_get_cs_by_tty(struct tty_struct *tty)
-{
-	if (tty->index < 0 || tty->index >= tty->driver->num)
-		return NULL;
-	return gigaset_get_cs_by_minor(tty->index + tty->driver->minor_start);
-}
-
-struct cardstate *gigaset_get_cs_by_minor(unsigned minor)
+static struct cardstate *gigaset_get_cs_by_minor(unsigned minor)
 {
 	unsigned long flags;
 	static struct cardstate *ret = NULL;
@@ -994,6 +986,13 @@
 	return ret;
 }
 

drivers/isdn/gigaset/common.c line 998

Quoted 10 lines
drivers/isdn/gigaset/common.c renamed from drivers/isdn/gigaset/common.c.old +7 -0
+struct cardstate *gigaset_get_cs_by_tty(struct tty_struct *tty)
+{
+	if (tty->index < 0 || tty->index >= tty->driver->num)
+		return NULL;
+	return gigaset_get_cs_by_minor(tty->index + tty->driver->minor_start);
+}
+
 void gigaset_freedriver(struct gigaset_driver *drv)
 {
 	unsigned long flags;

--
Tilman Schmidt E-Mail: [email protected]
Bonn, Germany
Diese Nachricht besteht zu 100% aus wiederverwerteten Bits. Ungeöffnet mindestens haltbar bis: (siehe Rückseite)