Commit 70440cf2 authored by Tilman Schmidt's avatar Tilman Schmidt Committed by Linus Torvalds

[PATCH] isdn4linux: Siemens Gigaset drivers: remove forward references

With Hansjoerg Lipp <hjlipp@web.de>

Remove four unnecessary forward function declarations and an obsolete E-mail
address from the Siemens Gigaset drivers.
Signed-off-by: default avatarHansjoerg Lipp <hjlipp@web.de>
Signed-off-by: default avatarTilman Schmidt <tilman@imap.cc>
Cc: Karsten Keil <kkeil@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 443e1f45
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* *
* Copyright (c) 2005 by Tilman Schmidt <tilman@imap.cc>, * Copyright (c) 2005 by Tilman Schmidt <tilman@imap.cc>,
* Hansjoerg Lipp <hjlipp@web.de>, * Hansjoerg Lipp <hjlipp@web.de>,
* Stefan Eilers <Eilers.Stefan@epost.de>. * Stefan Eilers.
* *
* ===================================================================== * =====================================================================
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* *
* Copyright (c) 2001 by Hansjoerg Lipp <hjlipp@web.de>, * Copyright (c) 2001 by Hansjoerg Lipp <hjlipp@web.de>,
* Tilman Schmidt <tilman@imap.cc>, * Tilman Schmidt <tilman@imap.cc>,
* Stefan Eilers <Eilers.Stefan@epost.de>. * Stefan Eilers.
* *
* Based on usb-gigaset.c. * Based on usb-gigaset.c.
* *
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#include <linux/moduleparam.h> #include <linux/moduleparam.h>
/* Version Information */ /* Version Information */
#define DRIVER_AUTHOR "Tilman Schmidt <tilman@imap.cc>, Hansjoerg Lipp <hjlipp@web.de>, Stefan Eilers <Eilers.Stefan@epost.de>" #define DRIVER_AUTHOR "Tilman Schmidt <tilman@imap.cc>, Hansjoerg Lipp <hjlipp@web.de>, Stefan Eilers"
#define DRIVER_DESC "USB Driver for Gigaset 307x" #define DRIVER_DESC "USB Driver for Gigaset 307x"
......
/* /*
* Stuff used by all variants of the driver * Stuff used by all variants of the driver
* *
* Copyright (c) 2001 by Stefan Eilers <Eilers.Stefan@epost.de>, * Copyright (c) 2001 by Stefan Eilers,
* Hansjoerg Lipp <hjlipp@web.de>, * Hansjoerg Lipp <hjlipp@web.de>,
* Tilman Schmidt <tilman@imap.cc>. * Tilman Schmidt <tilman@imap.cc>.
* *
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
#include <linux/moduleparam.h> #include <linux/moduleparam.h>
/* Version Information */ /* Version Information */
#define DRIVER_AUTHOR "Hansjoerg Lipp <hjlipp@web.de>, Tilman Schmidt <tilman@imap.cc>, Stefan Eilers <Eilers.Stefan@epost.de>" #define DRIVER_AUTHOR "Hansjoerg Lipp <hjlipp@web.de>, Tilman Schmidt <tilman@imap.cc>, Stefan Eilers"
#define DRIVER_DESC "Driver for Gigaset 307x" #define DRIVER_DESC "Driver for Gigaset 307x"
/* Module parameters */ /* Module parameters */
...@@ -28,15 +28,7 @@ EXPORT_SYMBOL_GPL(gigaset_debuglevel); ...@@ -28,15 +28,7 @@ EXPORT_SYMBOL_GPL(gigaset_debuglevel);
module_param_named(debug, gigaset_debuglevel, int, S_IRUGO|S_IWUSR); module_param_named(debug, gigaset_debuglevel, int, S_IRUGO|S_IWUSR);
MODULE_PARM_DESC(debug, "debug level"); MODULE_PARM_DESC(debug, "debug level");
/*====================================================================== /* driver state flags */
Prototypes of internal functions
*/
static struct cardstate *alloc_cs(struct gigaset_driver *drv);
static void free_cs(struct cardstate *cs);
static void make_valid(struct cardstate *cs, unsigned mask);
static void make_invalid(struct cardstate *cs, unsigned mask);
#define VALID_MINOR 0x01 #define VALID_MINOR 0x01
#define VALID_ID 0x02 #define VALID_ID 0x02
#define ASSIGNED 0x04 #define ASSIGNED 0x04
...@@ -400,6 +392,52 @@ static void gigaset_freebcs(struct bc_state *bcs) ...@@ -400,6 +392,52 @@ static void gigaset_freebcs(struct bc_state *bcs)
} }
} }
static struct cardstate *alloc_cs(struct gigaset_driver *drv)
{
unsigned long flags;
unsigned i;
static struct cardstate *ret = NULL;
spin_lock_irqsave(&drv->lock, flags);
for (i = 0; i < drv->minors; ++i) {
if (!(drv->flags[i] & VALID_MINOR)) {
drv->flags[i] = VALID_MINOR;
ret = drv->cs + i;
}
if (ret)
break;
}
spin_unlock_irqrestore(&drv->lock, flags);
return ret;
}
static void free_cs(struct cardstate *cs)
{
unsigned long flags;
struct gigaset_driver *drv = cs->driver;
spin_lock_irqsave(&drv->lock, flags);
drv->flags[cs->minor_index] = 0;
spin_unlock_irqrestore(&drv->lock, flags);
}
static void make_valid(struct cardstate *cs, unsigned mask)
{
unsigned long flags;
struct gigaset_driver *drv = cs->driver;
spin_lock_irqsave(&drv->lock, flags);
drv->flags[cs->minor_index] |= mask;
spin_unlock_irqrestore(&drv->lock, flags);
}
static void make_invalid(struct cardstate *cs, unsigned mask)
{
unsigned long flags;
struct gigaset_driver *drv = cs->driver;
spin_lock_irqsave(&drv->lock, flags);
drv->flags[cs->minor_index] &= ~mask;
spin_unlock_irqrestore(&drv->lock, flags);
}
void gigaset_freecs(struct cardstate *cs) void gigaset_freecs(struct cardstate *cs)
{ {
int i; int i;
...@@ -1117,52 +1155,6 @@ struct gigaset_driver *gigaset_initdriver(unsigned minor, unsigned minors, ...@@ -1117,52 +1155,6 @@ struct gigaset_driver *gigaset_initdriver(unsigned minor, unsigned minors,
} }
EXPORT_SYMBOL_GPL(gigaset_initdriver); EXPORT_SYMBOL_GPL(gigaset_initdriver);
static struct cardstate *alloc_cs(struct gigaset_driver *drv)
{
unsigned long flags;
unsigned i;
static struct cardstate *ret = NULL;
spin_lock_irqsave(&drv->lock, flags);
for (i = 0; i < drv->minors; ++i) {
if (!(drv->flags[i] & VALID_MINOR)) {
drv->flags[i] = VALID_MINOR;
ret = drv->cs + i;
}
if (ret)
break;
}
spin_unlock_irqrestore(&drv->lock, flags);
return ret;
}
static void free_cs(struct cardstate *cs)
{
unsigned long flags;
struct gigaset_driver *drv = cs->driver;
spin_lock_irqsave(&drv->lock, flags);
drv->flags[cs->minor_index] = 0;
spin_unlock_irqrestore(&drv->lock, flags);
}
static void make_valid(struct cardstate *cs, unsigned mask)
{
unsigned long flags;
struct gigaset_driver *drv = cs->driver;
spin_lock_irqsave(&drv->lock, flags);
drv->flags[cs->minor_index] |= mask;
spin_unlock_irqrestore(&drv->lock, flags);
}
static void make_invalid(struct cardstate *cs, unsigned mask)
{
unsigned long flags;
struct gigaset_driver *drv = cs->driver;
spin_lock_irqsave(&drv->lock, flags);
drv->flags[cs->minor_index] &= ~mask;
spin_unlock_irqrestore(&drv->lock, flags);
}
/* For drivers without fixed assignment device<->cardstate (usb) */ /* For drivers without fixed assignment device<->cardstate (usb) */
struct cardstate *gigaset_getunassignedcs(struct gigaset_driver *drv) struct cardstate *gigaset_getunassignedcs(struct gigaset_driver *drv)
{ {
......
/* /*
* Stuff used by all variants of the driver * Stuff used by all variants of the driver
* *
* Copyright (c) 2001 by Stefan Eilers <Eilers.Stefan@epost.de>, * Copyright (c) 2001 by Stefan Eilers,
* Hansjoerg Lipp <hjlipp@web.de>, * Hansjoerg Lipp <hjlipp@web.de>,
* Tilman Schmidt <tilman@imap.cc>. * Tilman Schmidt <tilman@imap.cc>.
* *
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* Siemens Gigaset 307x driver * Siemens Gigaset 307x driver
* Common header file for all connection variants * Common header file for all connection variants
* *
* Written by Stefan Eilers <Eilers.Stefan@epost.de> * Written by Stefan Eilers
* and Hansjoerg Lipp <hjlipp@web.de> * and Hansjoerg Lipp <hjlipp@web.de>
* *
* ===================================================================== * =====================================================================
......
/* /*
* Stuff used by all variants of the driver * Stuff used by all variants of the driver
* *
* Copyright (c) 2001 by Stefan Eilers (Eilers.Stefan@epost.de), * Copyright (c) 2001 by Stefan Eilers,
* Hansjoerg Lipp (hjlipp@web.de), * Hansjoerg Lipp <hjlipp@web.de>,
* Tilman Schmidt (tilman@imap.cc). * Tilman Schmidt <tilman@imap.cc>.
* *
* ===================================================================== * =====================================================================
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
......
/* /*
* Stuff used by all variants of the driver * Stuff used by all variants of the driver
* *
* Copyright (c) 2001 by Stefan Eilers <Eilers.Stefan@epost.de>, * Copyright (c) 2001 by Stefan Eilers,
* Hansjoerg Lipp <hjlipp@web.de>, * Hansjoerg Lipp <hjlipp@web.de>,
* Tilman Schmidt <tilman@imap.cc>. * Tilman Schmidt <tilman@imap.cc>.
* *
......
/* /*
* USB driver for Gigaset 307x directly or using M105 Data. * USB driver for Gigaset 307x directly or using M105 Data.
* *
* Copyright (c) 2001 by Stefan Eilers <Eilers.Stefan@epost.de> * Copyright (c) 2001 by Stefan Eilers
* and Hansjoerg Lipp <hjlipp@web.de>. * and Hansjoerg Lipp <hjlipp@web.de>.
* *
* This driver was derived from the USB skeleton driver by * This driver was derived from the USB skeleton driver by
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#include <linux/moduleparam.h> #include <linux/moduleparam.h>
/* Version Information */ /* Version Information */
#define DRIVER_AUTHOR "Hansjoerg Lipp <hjlipp@web.de>, Stefan Eilers <Eilers.Stefan@epost.de>" #define DRIVER_AUTHOR "Hansjoerg Lipp <hjlipp@web.de>, Stefan Eilers"
#define DRIVER_DESC "USB Driver for Gigaset 307x using M105" #define DRIVER_DESC "USB Driver for Gigaset 307x using M105"
/* Module parameters */ /* Module parameters */
...@@ -816,9 +816,6 @@ static int gigaset_probe(struct usb_interface *interface, ...@@ -816,9 +816,6 @@ static int gigaset_probe(struct usb_interface *interface,
return retval; return retval;
} }
/**
* skel_disconnect
*/
static void gigaset_disconnect(struct usb_interface *interface) static void gigaset_disconnect(struct usb_interface *interface)
{ {
struct cardstate *cs; struct cardstate *cs;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment