dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

29 Commits

Author SHA1 Message Date
Joe Perches 475be4d85a isdn: whitespace coding style cleanup
isdn source code uses a not-current coding style.

Update the coding style used on a per-line basis
so that git diff -w shows only elided blank lines
at EOF.

Done with emacs and some scripts and some typing.

Built x86 allyesconfig.
No detected change in objdump -d or size.

Signed-off-by: Joe Perches <joe@perches.com>
2012-02-21 09:04:01 -08:00
Namhyung Kim f8bf5681cf isdn/hisax: fix compiler warning on hisax_pci_tbl
Annotate hisax_pci_tbl as '__used' to fix following warning:

  CC      drivers/isdn/hisax/config.o
drivers/isdn/hisax/config.c:1920: warning: ‘hisax_pci_tbl’ defined but not used

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-12-08 10:49:00 -08:00
Thomas Gleixner 40f08a724f isdn: hisax: Replace the bogus access to irq stats
Abusing irq stats in a driver for counting interrupts is a horrible
idea and not safe with shared interrupts. Replace it by a local
interrupt counter.

Noticed by the attempt to remove the irq stats export.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ingo Molnar <mingo@elte.hu>
2010-10-12 16:39:06 +02:00
Peter Huewe 8f31539dfa isdn/hisax: Convert pci_table entries to PCI_VDEVICE (if PCI_ANY_ID is used)
This patch converts pci_table entries, where .subvendor=PCI_ANY_ID and
.subdevice=PCI_ANY_ID, .class=0 and .class_mask=0, to use the
PCI_VDEVICE macro, and thus improves readability.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-07-15 19:05:24 -07:00
Tejun Heo 5a0e3ad6af include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files.  percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -> slab.h dependency is about to be removed.  Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability.  As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

  http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
  only the necessary includes are there.  ie. if only gfp is used,
  gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
  blocks and try to put the new include such that its order conforms
  to its surrounding.  It's put in the include block which contains
  core kernel includes, in the same order that the rest are ordered -
  alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
  doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
  because the file doesn't have fitting include block), it prints out
  an error message indicating which .h file needs to be added to the
  file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
   over 4000 files, deleting around 700 includes and adding ~480 gfp.h
   and ~3000 slab.h inclusions.  The script emitted errors for ~400
   files.

2. Each error was manually checked.  Some didn't need the inclusion,
   some needed manual addition while adding it to implementation .h or
   embedding .c file was more appropriate for others.  This step added
   inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
   from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
   e.g. lib/decompress_*.c used malloc/free() wrappers around slab
   APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
   editing them as sprinkling gfp.h and slab.h inclusions around .h
   files could easily lead to inclusion dependency hell.  Most gfp.h
   inclusion directives were ignored as stuff from gfp.h was usually
   wildly available and often used in preprocessor macros.  Each
   slab.h inclusion directive was examined and added manually as
   necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
   were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
   distributed build env didn't work with gcov compiles) and a few
   more options had to be turned off depending on archs to make things
   build (like ipr on powerpc/64 which failed due to missing writeq).

   * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
   * powerpc and powerpc64 SMP allmodconfig
   * sparc and sparc64 SMP allmodconfig
   * ia64 SMP allmodconfig
   * s390 SMP allmodconfig
   * alpha SMP allmodconfig
   * um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
   a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-03-30 22:02:32 +09:00
Hannes Eder e86a6a1b78 drivers/isdn/hisax: fix sparse warning: Should it be static?
Impact: Move declarations to a header file.

Fix this sparse warning:
  drivers/isdn/hisax/callc.c:24:12: warning: symbol 'lli_revision' was not declared. Should it be static?
  drivers/isdn/hisax/config.c:84:12: warning: symbol 'CardType' was not declared. Should it be static?
  drivers/isdn/hisax/config.c:362:5: warning: symbol 'nrcards' was not declared. Should it be static?
  drivers/isdn/hisax/isdnl1.c:21:12: warning: symbol 'l1_revision' was not declared. Should it be static?
  drivers/isdn/hisax/isdnl2.c:22:12: warning: symbol 'l2_revision' was not declared. Should it be static?
  drivers/isdn/hisax/isdnl3.c:22:12: warning: symbol 'l3_revision' was not declared. Should it be static?
  drivers/isdn/hisax/tei.c:23:12: warning: symbol 'tei_revision' was not declared. Should it be static?

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-27 01:00:42 -08:00
Al Viro 56d74dd5f7 tricky one: hisax sections
a) hisax_init_pcmcia() needs to be defined only if we have
   CONFIG_HOTPLUG (no PCMCIA support otherwise) and can be declared
   __devinit.

b) HiSax_inithardware() can go __init

c) hisax_register() is passing to checkcard() full-blown hisax_cs_setup_card():
	checkcard(i, id, NULL, hisax_d_if->owner, hisax_cs_setup_card);
   The problem with it is that
	* hisax_cs_setup_card() is __devinit
	* hisax_register() is not
	* hisax_cs_setup_card() is a switch from hell, calling a lot of
	  setup_some_weirdcard() depending on card->typ.  _These_ are also
	  __devinit.

   However, in hisax_register() we have card->typ equal to
   ISDN_CTYPE_DYNAMIC, which reduces hisax_cs_setup_card() to "nevermind
   all that crap, just do nothing and return 2".  So we add a
   trimmed-down callback doing just that and passed to checkcard() by
   hisax_register().  _This_ is non-init (we can stand the impact on
   .text size).

Voila - no section warnings from drivers/isdn

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-11-30 10:03:37 -08:00
Jeff Garzik d38c8475b4 [ISDN] HiSax: modularization prep
Pass a function pointer into the core HiSax probe function checkcard(),
in order to facilitate modular drivers passing in their own setup
routines.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-20 18:22:30 -04:00
Sam Ravnborg 2fddb6e277 isdn: fix section mismatch warnings from hisax_cs_setup_card
Fix the following warnings:
WARNING: drivers/isdn/hisax/built-in.o(.text+0x722): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_teles3()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x72c): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_s0box()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x736): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_telespci()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x747): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_avm_pcipnp()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x74e): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_elsa()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x755): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_diva()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x75c): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_sedlbauer()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x763): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_netjet_s()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x76a): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_hfcpci()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x771): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_hfcsx()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x778): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_niccy()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x77f): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_bkm_a4t()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x786): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_sct_quadro()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x78d): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_gazel()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x794): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_w6692()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x79b): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_netjet_u()
WARNING: drivers/isdn/hisax/built-in.o(.text+0x7a2): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_enternow_pci()

checkcard() are the only user of hisax_cs_setup_card().
And checkcard is only used during init or when hot plugging
ISDN devices. So annotate hisax_cs_setup_card() with __devinit.
checkcard() is used by exported functions so it cannot be
annotated __devinit. Annotate it with __ref so modpost
ignore references to _devinit section.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Karsten Keil <kkeil@suse.de>
Cc: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-02-09 23:28:50 -08:00
Florin Malita 9ee0be05dc ISDN HiSax: uninitialized return in hisax_cs_setup
Coverity (1792) spotted a possibly uninitialized return value in case of
kmalloc() failure:

1116 static int hisax_cs_setup(int cardnr, struct IsdnCard *card,
1117                           struct IsdnCardState *cs)
1119         int ret;
1120
1121         if (!(cs->rcvbuf = kmalloc(MAX_DFRAME_LEN_L1, GFP_ATOMIC))) {
1122                 printk(KERN_WARNING "HiSax: No memory for isac rcvbuf\n");
1123                 ll_unload(cs);
1124                 goto outf_cs;
...
1165 outf_cs:
1166         kfree(cs);
1167         card->cs = NULL;
1168         return ret;

The straightforward solution would be to just add the missing
initialization but hardcoding the return value in the out_cs branch
(only taken on failure) seems to work just as well and it allows killing
a couple of other lines too.

Signed-off-by: Florin Malita <fmalita@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-18 18:17:23 -04:00
Jeff Garzik 881ebdc9f4 [ISDN] HiSax: move card state alloc/setup code into separate functions
Just code movement.  No code changes or cleanups besides that which
is required to call the new functions from the old code site.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-17 17:14:23 -04:00
Jeff Garzik 82bcda9596 [ISDN] HiSax: move card setup into separate function
No behavior changes, just code movement.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-17 17:00:32 -04:00
David Woodhouse 6acee02712 Mismatching declarations of revision strings in HiSax
The {l1,l2,l3,lli,tei}_revision strings in the HiSax driver are 'const',
but have a mismatching declaration as 'extern char *' in config.c.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-17 10:23:05 -07:00
Alan Stern ae2d990eed HiSax: fix error checking for hisax_register()]
This patch (as875) adds error-checking to the callers of hisax_register().
It also changes an error pathway in that routine, making it return an error
code rather than 0.

This fixes Bugzilla #7960.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Karsten Keil <kkeil@suse.de>
Cc: Martin Bachem <info@colognechip.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-23 20:14:14 -07:00
Robert P. J. Day f0d8737bf7 [PATCH] ISDN: Remove defunct test emulator
Based on advice from K.  Keil, get rid of remaining traces of defunct test
emulator for HISAX.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Acked-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-12 09:48:34 -08:00
Robert P. J. Day e3f2769e6e [PATCH] ISDN: Fix typo "CONFIG_HISAX_QUADRO" -> "CONFIG_HISAX_SCT_QUADRO".
Replace misspelled CONFIG_HISAX_QUADRO with CONFIG_HISAX_SCT_QUADRO.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Acked-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-12 09:48:34 -08:00
Adrian Bunk 281f15e6d9 [PATCH] i4l: remove the broken HISAX_AMD7930 option
HISAX_AMD7930 was never anywhere near to being working, and this doesn't
seem to change in the forseeable future.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:29:01 -08:00
Burman Yan 41f96935b4 [PATCH] isdn: replace kmalloc+memset with kzalloc
Acked-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:29:01 -08:00
David Howells c4028958b6 WorkStruct: make allyesconfig
Fix up for make allyesconfig.

Signed-Off-By: David Howells <dhowells@redhat.com>
2006-11-22 14:57:56 +00:00
Jeff Garzik 7786ce192f [PATCH] ISDN: check for userspace copy faults
Most of the ISDN ->readstat() implementations needed to check
copy_to_user() and put_user() return values.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Cc: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-17 08:18:49 -07:00
Alan Cox 17a4506d0e [PATCH] ISDN warning fixes
Clean up warnings in drivers/isdn by using long not int for the values
where we pass void * and cast to integer types.  The code is ok (ok passing
the stuff this way isn't pretty but the code is valid).  In all the cases I
checked out the right thing happens anyway but this removes all the
warnings.

Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Jeff Garzik <jeff@garzik.org>
Acked-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-03 08:03:41 -07:00
Karsten Keil 67eb5db587 [PATCH] hisax: fix usage of __init*
Fix the warnings about the section mismatches for __init* in the HiSax
driver.

Signed-off-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-07-10 13:24:15 -07:00
Jörn Engel 6ab3d5624e Remove obsolete #include <linux/config.h>
Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-06-30 19:25:36 +02:00
Adrian Bunk 41c28ff163 [PATCH] kill _INLINE_
This patch removes all occurances of _INLINE_ in the kernel.

With the exception of tty_flip.h, I've simply removed the inline's since
gcc should know best which functions to be inlined.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-23 07:38:16 -08:00
Karsten Keil 1e4b27df55 [PATCH] i4l: add new PCI IDs for HFC-S PCI
Add new PCI IDs for HFC-S PCI based ISDN TA 'Primux II S0' and 'Primux II S0'
from Gerdes AG

Signed-off-by: Martin Bachem <info@colognechip.com>
Signed-off-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-06 18:40:43 -08:00
Jesper Juhl 3c7208f253 [PATCH] kfree cleanup: drivers/isdn
This is the drivers/isdn/ part of the big kfree cleanup patch.

Remove pointless checks for NULL prior to calling kfree() in drivers/isdn/.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Acked-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-07 07:54:02 -08:00
Olivier Blin 49f2991585 [PATCH] i4l: add Olitec ISDN PCI card in hisax gazel driver
This patch adds support for the Olitec ISDN PCI card in the hisax gazel
driver.  The gazel driver supports this card, but wasn't aware of its PCI
ids.  Users used to modify the PCI ids of a supported card in
include/linux/pci_ids.h and recompile their kernel to get this card
running, as said in most Howtos.  This patch makes the hisax gazel driver
recognize the PCI ids of the Olitec ISDN PCI card.

Signed-off-by: Olivier Blin <oblin@mandriva.com>
Signed-off-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-27 16:25:51 -07:00
Adrian Bunk 672c3fd906 [PATCH] drivers/isdn/hisax/: possible cleanups
This patch contains the following possible cleanups:
- make needlessly global code static
- remove the compiled but unused st5481_hdlc.{c,h}
- kill enternow.h
- enternow_pci.c: kill InByte/OutByte/BYTE
- isdnl2.c: kill FreeSkb
- remove or #if 0 the following unused functions:
  - config.c: IsdnCardState
  - ipacx.c: ipacx_new_ph
  - ipacx.c: dch_bh
  - ipacx.c: setup_ipacx
  - isdnl2.c: IsRR

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Kai Germaschewski <kai@germaschewski.name>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-25 16:25:07 -07:00
Linus Torvalds 1da177e4c3 Linux-2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!
2005-04-16 15:20:36 -07:00