GitHub/exynos8895/android_kernel_samsung_universal8895.git
12 years agostaging: csr: delete a bunch of unused library functions
Greg Kroah-Hartman [Sat, 21 Jul 2012 00:25:09 +0000 (17:25 -0700)]
staging: csr: delete a bunch of unused library functions

These functions were never being called, so they can be safely deleted.

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: remove csr_utf16.c
Greg Kroah-Hartman [Sat, 21 Jul 2012 00:04:08 +0000 (17:04 -0700)]
staging: csr: remove csr_utf16.c

Only one function was being used in the file, so move it to where it was
being called and delete the rest of the file, and csr_unicode.h as it's
no longer needed as well.

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: remove csr_pmem.h
Greg Kroah-Hartman [Fri, 20 Jul 2012 23:50:34 +0000 (16:50 -0700)]
staging: csr: remove csr_pmem.h

It's no longer needed.

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: remove CsrPmemAlloc
Greg Kroah-Hartman [Fri, 20 Jul 2012 23:41:09 +0000 (16:41 -0700)]
staging: csr: remove CsrPmemAlloc

It's just a wrapper around kmalloc(, GFP_KERNEL) + a call to panic() if
we are out of memory, which is a very foolish thing to do (the panic
that is.)

So replace it with calls to kmalloc() and ignore the out-of-memory
casese for now, odds are it will not be hit, and if it does, hey, we
will end up panicing just the same as with the old code.

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: remove CsrPmemFree()
Greg Kroah-Hartman [Fri, 20 Jul 2012 22:59:12 +0000 (15:59 -0700)]
staging: csr: remove CsrPmemFree()

It's just a wrapper around kfree() so call that instead.

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: remove CsrMemAllocDma()
Greg Kroah-Hartman [Fri, 20 Jul 2012 22:47:35 +0000 (15:47 -0700)]
staging: csr: remove CsrMemAllocDma()

It's just a call to kmalloc(, GFP_KERNEL | GFP_DMA);

But, all memory allocated by kmalloc can be DMAed, and that's not what
GFP_DMA means, so remove that flag, and just call kmalloc(, GFP_KERNEL);

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: remove CsrMemCalloc()
Greg Kroah-Hartman [Fri, 20 Jul 2012 22:43:05 +0000 (15:43 -0700)]
staging: csr: remove CsrMemCalloc()

No one calls it, so it doesn't need to be here.

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: remove CsrMemAlloc()
Greg Kroah-Hartman [Fri, 20 Jul 2012 22:37:12 +0000 (15:37 -0700)]
staging: csr: remove CsrMemAlloc()

It's just calling kmalloc(, GFP_KERNEL), so call that instead.
A few places should be calling kzalloc(), so do that, and remove the
call to memset at the same time.

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: remove CsrMemFree() and CsrMemFreeDma()
Greg Kroah-Hartman [Fri, 20 Jul 2012 22:26:55 +0000 (15:26 -0700)]
staging: csr: remove CsrMemFree() and CsrMemFreeDma()

They were just wrappers around kfree() so call that instead.

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: remove csr_util.h
Greg Kroah-Hartman [Fri, 20 Jul 2012 22:14:52 +0000 (15:14 -0700)]
staging: csr: remove csr_util.h

Now that the header file has nothing in it, remove it from the tree, and
adjust the places that were including it.

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: remove CsrOffSetOf()
Greg Kroah-Hartman [Fri, 20 Jul 2012 22:09:16 +0000 (15:09 -0700)]
staging: csr: remove CsrOffSetOf()

It's really just offsetof, so call that instead.

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostating: csr: remove unneeded #includes in csr_util.c
Greg Kroah-Hartman [Fri, 20 Jul 2012 22:06:15 +0000 (15:06 -0700)]
stating: csr: remove unneeded #includes in csr_util.c

This .c file only holds the MODULE_* stuff for the module, so remove the
other #include calls as they are not needed anymore.

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: make CsrUInt16ToHex static
Greg Kroah-Hartman [Fri, 20 Jul 2012 22:04:31 +0000 (15:04 -0700)]
staging: csr: make CsrUInt16ToHex static

We do this by moving it from csr_util.c to csr_wifi_hip_card_sdio_intr.c
as that's the only place that called it.

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: remove CsrMemCpy()
Greg Kroah-Hartman [Fri, 20 Jul 2012 22:01:05 +0000 (15:01 -0700)]
staging: csr: remove CsrMemCpy()

It was just a wrapper around memcpy() so call that instead.

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: remove CsrStrLen()
Greg Kroah-Hartman [Fri, 20 Jul 2012 21:56:57 +0000 (14:56 -0700)]
staging: csr: remove CsrStrLen()

It's just a wrapper around strlen(), so call that instead.

Also add a few #include <linux/string.h> to fix up the build with this
change.

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: remove CsrVsnprintf()
Greg Kroah-Hartman [Fri, 20 Jul 2012 21:50:38 +0000 (14:50 -0700)]
staging: csr: remove CsrVsnprintf()

It's just a wrapper for vsnprintf() so call that instead.

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: remove CsrStrDup
Greg Kroah-Hartman [Fri, 20 Jul 2012 21:47:11 +0000 (14:47 -0700)]
staging: csr: remove CsrStrDup

Use kstrdup() for the few places that called it, and remove
CsrUtf8StrDup() as no one calls that function.

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: remove CsrStrChr()
Greg Kroah-Hartman [Fri, 20 Jul 2012 21:42:02 +0000 (14:42 -0700)]
staging: csr: remove CsrStrChr()

No one was calling it, so remove it.

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: remove CsrStrNCmp
Greg Kroah-Hartman [Fri, 20 Jul 2012 21:39:57 +0000 (14:39 -0700)]
staging: csr: remove CsrStrNCmp

Only CsrUtf8StrNCmp() was calling it, and nothing was calling
CsrUtf8StrNCmp(), so remove both of them.

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: remove CsrStrCmp
Greg Kroah-Hartman [Fri, 20 Jul 2012 21:35:23 +0000 (14:35 -0700)]
staging: csr: remove CsrStrCmp

Only CsrUtf8StrCmp() was calling it, and nothing was calling
CsrUtf8StrCmp(), so remove both of them.

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: remove CsrStrNcpy
Greg Kroah-Hartman [Fri, 20 Jul 2012 21:27:26 +0000 (14:27 -0700)]
staging: csr: remove CsrStrNcpy

A few other functions were using it, but no one was calling them, so
remove them as well:
CsrUtf8StrNCpy()
CsrUtf8StrNCpyZero()
CsrUtf8StringConcatenateTexts()

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: remove CsrStrCpy
Greg Kroah-Hartman [Fri, 20 Jul 2012 21:23:42 +0000 (14:23 -0700)]
staging: csr: remove CsrStrCpy

It was really just strcpy() so use that instead.  Also remove
CsrUtf8StrCpy() as no one was calling that function.

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: remove CsrMemMove()
Greg Kroah-Hartman [Fri, 20 Jul 2012 21:19:46 +0000 (14:19 -0700)]
staging: csr: remove CsrMemMove()

No one was using it (it was also just a wrapper for memmove).

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: remove CsrMemCmp
Greg Kroah-Hartman [Fri, 20 Jul 2012 21:18:02 +0000 (14:18 -0700)]
staging: csr: remove CsrMemCmp

It's really just memcmp(), so call that instead.

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: remove CsrMemSet
Greg Kroah-Hartman [Fri, 20 Jul 2012 21:16:11 +0000 (14:16 -0700)]
staging: csr: remove CsrMemSet

It's really just memset(), so call that instead.

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: remove a bunch of unused functions in csr_util.c
Greg Kroah-Hartman [Fri, 20 Jul 2012 21:11:58 +0000 (14:11 -0700)]
staging: csr: remove a bunch of unused functions in csr_util.c

They were wrappers for other functions already in the kernel, and no one
was even calling them, so remove them.

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: remove indications.c
Greg Kroah-Hartman [Fri, 20 Jul 2012 20:13:04 +0000 (13:13 -0700)]
staging: csr: remove indications.c

It's an empty file, no need to build and link it.

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: remove csr_types.h
Greg Kroah-Hartman [Fri, 20 Jul 2012 20:07:13 +0000 (13:07 -0700)]
staging: csr: remove csr_types.h

Only thing left in here is the TRUE/FALSE #defines, so move them to
csr_macro.h and remove the file.

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: remove CsrUint64 and CsrInt64 typedefs.
Greg Kroah-Hartman [Fri, 20 Jul 2012 19:40:30 +0000 (12:40 -0700)]
staging: csr: remove CsrUint64 and CsrInt64 typedefs.

CsrInt64 wasn't being used, and CsrUint64 was only used in one place, so
replace that with u64.

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: remove odd pointer typedefs
Greg Kroah-Hartman [Fri, 20 Jul 2012 19:35:14 +0000 (12:35 -0700)]
staging: csr: remove odd pointer typedefs

No one was using CsrPtrdiff or CsrUintptr, but CsrIntptr is used in one
place, so replace that with ptrdiff_t.  Odds are all it really wants is
a void * there, but hey, I'll play along for now.

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: remove CsrSize typedef
Greg Kroah-Hartman [Fri, 20 Jul 2012 19:27:19 +0000 (12:27 -0700)]
staging: csr: remove CsrSize typedef

Use size_t instead.

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: remove CsrBool typedef
Greg Kroah-Hartman [Fri, 20 Jul 2012 19:25:15 +0000 (12:25 -0700)]
staging: csr: remove CsrBool typedef

Use u8 instead.

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: remove CsrCharString typedef
Greg Kroah-Hartman [Fri, 20 Jul 2012 19:22:32 +0000 (12:22 -0700)]
staging: csr: remove CsrCharString typedef

Use char instead.

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: remove CsrUtf8String typedef
Greg Kroah-Hartman [Fri, 20 Jul 2012 19:19:55 +0000 (12:19 -0700)]
staging: csr: remove CsrUtf8String typedef

Use the in-kernel u8 type instead.

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: remove CsrUtf16String typedef
Greg Kroah-Hartman [Fri, 20 Jul 2012 19:17:59 +0000 (12:17 -0700)]
staging: csr: remove CsrUtf16String typedef

Use the in-kernel u16 type instead.

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: remove CsrUint24 typedef
Greg Kroah-Hartman [Fri, 20 Jul 2012 19:14:51 +0000 (12:14 -0700)]
staging: csr: remove CsrUint24 typedef

Use the in-kernel u32 type instead.

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: remove CsrInt32 typedef
Greg Kroah-Hartman [Fri, 20 Jul 2012 19:07:25 +0000 (12:07 -0700)]
staging: csr: remove CsrInt32 typedef

Use the in-kernel s32 type instead.

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: remove CsrUint32 typedef
Greg Kroah-Hartman [Fri, 20 Jul 2012 19:05:42 +0000 (12:05 -0700)]
staging: csr: remove CsrUint32 typedef

Use the in-kernel u32 type instead.

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: remove CsrInt16 typedef
Greg Kroah-Hartman [Fri, 20 Jul 2012 19:02:00 +0000 (12:02 -0700)]
staging: csr: remove CsrInt16 typedef

Use the in-kernel s16 type instead.

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: remove CsrUint16 typedef
Greg Kroah-Hartman [Fri, 20 Jul 2012 19:00:10 +0000 (12:00 -0700)]
staging: csr: remove CsrUint16 typedef

Use the in-kernel u16 type instead.

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: remove CsrInt8 typedef
Greg Kroah-Hartman [Fri, 20 Jul 2012 18:56:26 +0000 (11:56 -0700)]
staging: csr: remove CsrInt8 typedef

Use the in-kernel s8 type instead.

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: remove CsrUint8 typedef
Greg Kroah-Hartman [Fri, 20 Jul 2012 18:51:01 +0000 (11:51 -0700)]
staging: csr: remove CsrUint8 typedef

Use the in-kernel u8 type instead.

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: clean up csr_types.h a bit
Greg Kroah-Hartman [Fri, 20 Jul 2012 18:25:50 +0000 (11:25 -0700)]
staging: csr: clean up csr_types.h a bit

Remove the floating point variables and the sections that are not being
built if the code isn't in the kernel.

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: remove sdioemb/
Greg Kroah-Hartman [Fri, 20 Jul 2012 18:21:41 +0000 (11:21 -0700)]
staging: csr: remove sdioemb/

Nothing in the subdirectory is being used, so remove it, and the
sdio_emb.c file which also isn't being built.

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: remove oska submodule
Greg Kroah-Hartman [Fri, 20 Jul 2012 00:52:51 +0000 (17:52 -0700)]
staging: csr: remove oska submodule

Turns out nothing in this module was being used at all, so instead of
deleting it piece by piece, just remove the whole thing.  I don't know
why it was added in the first place.

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: oska: remove timer.c and timer.h
Greg Kroah-Hartman [Fri, 20 Jul 2012 00:51:56 +0000 (17:51 -0700)]
staging: csr: oska: remove timer.c and timer.h

No one is using these, remove them.

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: oska: remove time.h
Greg Kroah-Hartman [Fri, 20 Jul 2012 00:47:44 +0000 (17:47 -0700)]
staging: csr: oska: remove time.h

No one was including it, so remove it.

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: oska: remove print.h and print.c
Greg Kroah-Hartman [Fri, 20 Jul 2012 00:46:17 +0000 (17:46 -0700)]
staging: csr: oska: remove print.h and print.c

No one was calling these functions, so remove them.

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: oska: remove list.c and list.h
Greg Kroah-Hartman [Fri, 20 Jul 2012 00:44:09 +0000 (17:44 -0700)]
staging: csr: oska: remove list.c and list.h

No one is using these functions, so remove them.

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: oska: remove all.h and types.h
Greg Kroah-Hartman [Fri, 20 Jul 2012 00:42:52 +0000 (17:42 -0700)]
staging: csr: oska: remove all.h and types.h

No one is using these (with one minor exception that was fixed in
list.c) so remove the header files.

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: oska: remove refcount.c
Greg Kroah-Hartman [Fri, 20 Jul 2012 00:37:48 +0000 (17:37 -0700)]
staging: csr: oska: remove refcount.c

It's not called by anyone, so remove it and the .h file and don't export
the functions as they are not around anymore.

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: csr: oska: remove io.h
Greg Kroah-Hartman [Fri, 20 Jul 2012 00:35:13 +0000 (17:35 -0700)]
staging: csr: oska: remove io.h

Nothing is including it, so remove it.

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: csr: remove oska compat functions
Greg Kroah-Hartman [Fri, 20 Jul 2012 00:33:09 +0000 (17:33 -0700)]
Staging: csr: remove oska compat functions

These functions were for older kernel versions, which we aren't
supporting anymore now that this is in the kernel.  So remove the files,
they are no longer needed.

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: sep_crypto.c: remove duplicated include
Duan Jiong [Wed, 18 Jul 2012 14:33:38 +0000 (22:33 +0800)]
staging: sep_crypto.c: remove duplicated include

Signed-off-by: Duan Jiong <djduanjiong@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: sep_main.c: remove duplicated include
Duan Jiong [Wed, 18 Jul 2012 14:30:30 +0000 (22:30 +0800)]
staging: sep_main.c: remove duplicated include

Signed-off-by: Duan Jiong <djduanjiong@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: s526: remove unused variables in the private data
H Hartley Sweeten [Thu, 19 Jul 2012 02:05:55 +0000 (19:05 -0700)]
staging: comedi: s526: remove unused variables in the private data

The 'data' and 'pci_dev' variables in the private data are not used.
They appear to be cut-and-paste from the skel driver. Remove them.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: aio_iiro_16: remove the private data
H Hartley Sweeten [Thu, 19 Jul 2012 02:05:32 +0000 (19:05 -0700)]
staging: comedi: aio_iiro_16: remove the private data

The private data is not used by this driver. Remove the struct,
devpriv macro, and the allocation.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: rtd520: store the pci_dev in the comedi_device
H Hartley Sweeten [Thu, 19 Jul 2012 02:05:13 +0000 (19:05 -0700)]
staging: comedi: rtd520: store the pci_dev in the comedi_device

Use the hw_dev pointer in the comedi_device struct to hold the
pci_dev instead of carrying it in the private data.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: rtd520: remove the '#if 0' code in the attach
H Hartley Sweeten [Thu, 19 Jul 2012 02:04:56 +0000 (19:04 -0700)]
staging: comedi: rtd520: remove the '#if 0' code in the attach

This driver has code #if 0'ed out that would allow cleaning up
the attach if there was an error. The comedi core currently
calls the detach function to do this if the attach fails.

Remove the #if 0'ed out code.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: rtd520: remove 'got_regions' from private data
H Hartley Sweeten [Thu, 19 Jul 2012 02:04:37 +0000 (19:04 -0700)]
staging: comedi: rtd520: remove 'got_regions' from private data

The 'got_regions' variable in the private data is used as a flag
for the detach to know if the pci device has been enabled.

Typically the dev->iobase variable is used to indicate this in
all the other comedi drivers. Do the same here for consistancy.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: rtd520: remove the debug print of the pci addresses
H Hartley Sweeten [Thu, 19 Jul 2012 02:04:18 +0000 (19:04 -0700)]
staging: comedi: rtd520: remove the debug print of the pci addresses

This is just noise.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: me_daq: store the pci_dev in the comedi_device
H Hartley Sweeten [Thu, 19 Jul 2012 02:03:59 +0000 (19:03 -0700)]
staging: comedi: me_daq: store the pci_dev in the comedi_device

Use the hw_dev pointer in the comedi_device struct to hold the
pci_dev instead of carrying it in the private data.

Since the pci_dev was the only thing in the private data, remove
the struct, the devpriv macro, and it's allocation.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: me_daq: cleanup "find pci device" code
H Hartley Sweeten [Thu, 19 Jul 2012 02:03:43 +0000 (19:03 -0700)]
staging: comedi: me_daq: cleanup "find pci device" code

Cleanup the "find pci device" code so that it follows the style
of the other comedi pci drivers.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: me_daq: factor out the "find pci device" code
H Hartley Sweeten [Thu, 19 Jul 2012 02:03:25 +0000 (19:03 -0700)]
staging: comedi: me_daq: factor out the "find pci device" code

Factor the "find pci device" code out of the attach function.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: ke_counter: remove the cnt_board_nbr macro
H Hartley Sweeten [Thu, 19 Jul 2012 02:03:08 +0000 (19:03 -0700)]
staging: comedi: ke_counter: remove the cnt_board_nbr macro

This macro is an open-coded version of ARRAY_SIZE(). Use that
instead.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: ke_counter: store the pci_dev in the comedi_device
H Hartley Sweeten [Thu, 19 Jul 2012 02:02:50 +0000 (19:02 -0700)]
staging: comedi: ke_counter: store the pci_dev in the comedi_device

Use the hw_dev pointer in the comedi_device struct to hold the
pci_dev instead of carrying it in the private data.

Since the pci_dev was the only thing in the private data, remove
the struct, the devpriv macro, and it's allocation.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: ke_counter: minor cleanup of cnt_attach()
H Hartley Sweeten [Thu, 19 Jul 2012 02:02:29 +0000 (19:02 -0700)]
staging: comedi: ke_counter: minor cleanup of cnt_attach()

Cleanup the attach function a bit to follow the style of
the other comedi pci drivers.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: ke_counter: cleanup "find pci device" code
H Hartley Sweeten [Thu, 19 Jul 2012 02:02:11 +0000 (19:02 -0700)]
staging: comedi: ke_counter: cleanup "find pci device" code

Cleanup the "find pci device" code so that it follows the style
of the other comedi pci drivers.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: ke_counter: factor out the "find pci device" code
H Hartley Sweeten [Thu, 19 Jul 2012 02:01:52 +0000 (19:01 -0700)]
staging: comedi: ke_counter: factor out the "find pci device" code

Factor the "find pci device" code out of the attach function.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: dyna_pci10xx: fix detach
H Hartley Sweeten [Thu, 19 Jul 2012 02:01:34 +0000 (19:01 -0700)]
staging: comedi: dyna_pci10xx: fix detach

The detach for this driver is missing the check to make sure
that the pci device is enabled before disabling it.

It's also missing the pci_dev_put().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: dyna_pci10xx: store the pci_dev in the comedi_device
H Hartley Sweeten [Thu, 19 Jul 2012 02:01:13 +0000 (19:01 -0700)]
staging: comedi: dyna_pci10xx: store the pci_dev in the comedi_device

Use the hw_dev pointer in the comedi_device struct to hold the
pci_dev instead of carrying it in the private data.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: dyna_pci10xx: use dev->iobase
H Hartley Sweeten [Thu, 19 Jul 2012 02:00:54 +0000 (19:00 -0700)]
staging: comedi: dyna_pci10xx: use dev->iobase

Use dev->iobase to hold one of the pci base addresses used
by the driver instead of carrying it in the private data.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: dyna_pci10xx: remove unused bars from the private data
H Hartley Sweeten [Thu, 19 Jul 2012 02:00:37 +0000 (19:00 -0700)]
staging: comedi: dyna_pci10xx: remove unused bars from the private data

All of the pci device base address registers are saved in the private
data but only bar2 and bar3 are used by the driver. Remove the others.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: dyna_pci10xx: remove 'valid' from the private data
H Hartley Sweeten [Thu, 19 Jul 2012 02:00:04 +0000 (19:00 -0700)]
staging: comedi: dyna_pci10xx: remove 'valid' from the private data

This variable is set at the end of the attach but never used
in the driver. Remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: dyna_pci10xx: remove the 'start_stop_sem' mutex
H Hartley Sweeten [Thu, 19 Jul 2012 01:59:35 +0000 (18:59 -0700)]
staging: comedi: dyna_pci10xx: remove the 'start_stop_sem' mutex

The comedi core already has a mutex protecting the attach/detach
of the comedi drivers.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: dyna_pci10xx: cleanup "find pci device" code
H Hartley Sweeten [Thu, 19 Jul 2012 01:59:17 +0000 (18:59 -0700)]
staging: comedi: dyna_pci10xx: cleanup "find pci device" code

Cleanup the "find pci device" code so that it follows the style
of the other comedi pci drivers.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: dyna_pci10xx: factor out the "find pci device" code
H Hartley Sweeten [Thu, 19 Jul 2012 01:59:00 +0000 (18:59 -0700)]
staging: comedi: dyna_pci10xx: factor out the "find pci device" code

Factor the "find pci device" code out of the attach function.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: dt3000: store the pci_dev in the comedi_device
H Hartley Sweeten [Thu, 19 Jul 2012 01:58:43 +0000 (18:58 -0700)]
staging: comedi: dt3000: store the pci_dev in the comedi_device

Use the hw_dev pointer in the comedi_device struct to hold the
pci_dev instead of carrying it in the private data.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: dt3000: remove 'phys_addr' from the private data
H Hartley Sweeten [Thu, 19 Jul 2012 01:58:24 +0000 (18:58 -0700)]
staging: comedi: dt3000: remove 'phys_addr' from the private data

The 'phys_addr' variable in the private data is simply used as
a flag for the detach function to know that the pci device has
been enabled. Use the 'dev->iobase' variable instead as is more
typical for other comedi pci drivers.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: dt3000: move the setup_pci() code into the attach
H Hartley Sweeten [Thu, 19 Jul 2012 01:58:07 +0000 (18:58 -0700)]
staging: comedi: dt3000: move the setup_pci() code into the attach

The setup_pci() function simply calls comedi_pci_enable() to enable
the device then ioremaps the pci address. Move the code directly
into the attach function as is more typical for the comedi pci
drivers.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: dt3000: cleanup "find pci device" code
H Hartley Sweeten [Thu, 19 Jul 2012 01:57:49 +0000 (18:57 -0700)]
staging: comedi: dt3000: cleanup "find pci device" code

The "find pci device" code for this driver was split between
two functions which could cause the driver to walk the pci
bus multiple times while looking for a match.

Consolidate the functions into the format that is more
standard for the comedi pci drivers.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: daqboard2000: void *plx should be a void __iomem *
H Hartley Sweeten [Thu, 19 Jul 2012 01:57:28 +0000 (18:57 -0700)]
staging: comedi: daqboard2000: void *plx should be a void __iomem *

The private data variable 'plx' is an ioremap'ed pci resource and
should be a void __iomem *. This quiets a number of sparse warnings
about "different address spaces".

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: daqboard2000: store the pci_dev in the comedi_device
H Hartley Sweeten [Thu, 19 Jul 2012 01:57:08 +0000 (18:57 -0700)]
staging: comedi: daqboard2000: store the pci_dev in the comedi_device

Use the hw_dev pointer in the comedi_device struct to hold the
pci_dev instead of carrying it in the private data.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: daqboard2000: remove 'got_regions' from private data
H Hartley Sweeten [Thu, 19 Jul 2012 01:56:49 +0000 (18:56 -0700)]
staging: comedi: daqboard2000: remove 'got_regions' from private data

The 'got_regions' variable in the private data is used as a flag
for the detach to know if the pci device has been enabled.

Typically the dev->iobase variable is used to indicate this in
all the other comedi drivers. Do the same here for consistancy.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: daqboard2000: cleanup "find pci device" code
H Hartley Sweeten [Thu, 19 Jul 2012 01:56:29 +0000 (18:56 -0700)]
staging: comedi: daqboard2000: cleanup "find pci device" code

The "find pci device" code for this driver was quite a bit
different from the other comedi pci drivers. Clean it up so
it follows the format of the other drivers.

Use for_each_pci_dev() instead of open-coding the loop using
pci_get_device().

Check for a specific bus/slot then the vendor/device ids.

The loop checking for the matching boardinfo was creating an
"id" based on the subsystem_device and subsystem_vendor info
from the pci_dev. The vendor id was already checked so just
check against the subsystem_device.

Only return the pci_dev if a matching boardinfo is found.

Consolidate the dev_err messages when a device is not found
into a single message.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: daqboard2000: factor out the "find pci device" code
H Hartley Sweeten [Thu, 19 Jul 2012 01:51:18 +0000 (18:51 -0700)]
staging: comedi: daqboard2000: factor out the "find pci device" code

Factor the "find pci device" code out of the attach function.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: contec_pci_dio: remove the private data
H Hartley Sweeten [Thu, 19 Jul 2012 01:50:59 +0000 (18:50 -0700)]
staging: comedi: contec_pci_dio: remove the private data

The private data is no longer needed by this driver. Remove the
struct, devpriv macro, and the allocation.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: contec_pci_dio: store the pci_dev in the comedi_device
H Hartley Sweeten [Thu, 19 Jul 2012 01:50:42 +0000 (18:50 -0700)]
staging: comedi: contec_pci_dio: store the pci_dev in the comedi_device

Use the hw_dev pointer in the comedi_device struct to hold the
pci_dev instead of carrying it in the private data.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: contec_pci_dio: cleanup "find pci device" code
H Hartley Sweeten [Thu, 19 Jul 2012 01:50:16 +0000 (18:50 -0700)]
staging: comedi: contec_pci_dio: cleanup "find pci device" code

Add a couple local variables and reorder the tests to make
to make the more concise.

Change the printk to a dev_err when no match is found and reword
the message.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: contec_pci_dio: factor out the "find pci device" code
H Hartley Sweeten [Thu, 19 Jul 2012 01:49:56 +0000 (18:49 -0700)]
staging: comedi: contec_pci_dio: factor out the "find pci device" code

Factor the "find pci device" code out of the attach function.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: cb_pcimdas: store the pci_dev in the comedi_device
H Hartley Sweeten [Thu, 19 Jul 2012 01:49:35 +0000 (18:49 -0700)]
staging: comedi: cb_pcimdas: store the pci_dev in the comedi_device

Use the hw_dev pointer in the comedi_device struct to hold the
pci_dev instead of carrying it in the private data.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: cb_pcimdas: remove BADR0 from the private data
H Hartley Sweeten [Thu, 19 Jul 2012 01:49:03 +0000 (18:49 -0700)]
staging: comedi: cb_pcimdas: remove BADR0 from the private data

The pci resource bar 0 address is only used as a "flag" to
let the datach function know that the pci device has been
enabled. Use dev->iobase in the detach instead and remove
BADR0 from the private data.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: cb_pcimdas: remove BADR2 from the private data
H Hartley Sweeten [Thu, 19 Jul 2012 01:48:27 +0000 (18:48 -0700)]
staging: comedi: cb_pcimdas: remove BADR2 from the private data

The pci resource bar 2 address is the primary i/o address used
by this device. Store it in dev->iobase and remove it from the
private data.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: cb_pcimdas: remove BADR4 from the private data
H Hartley Sweeten [Thu, 19 Jul 2012 01:48:07 +0000 (18:48 -0700)]
staging: comedi: cb_pcimdas: remove BADR4 from the private data

The pci resource bar 4 address is only needed to initialize the
8255 subdevice. Use a local variable to hold it and remove it
from the private data.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: cb_pcimdas: remove BADR1 from the private data
H Hartley Sweeten [Thu, 19 Jul 2012 01:47:46 +0000 (18:47 -0700)]
staging: comedi: cb_pcimdas: remove BADR1 from the private data

The pci resource bar 1 address is not used in the driver. Remove
it from the private data.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: cb_pcimdas: cleanup the private data
H Hartley Sweeten [Thu, 19 Jul 2012 01:47:11 +0000 (18:47 -0700)]
staging: comedi: cb_pcimdas: cleanup the private data

Remove the unused variables from the private data.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: cb_pcimdas: remove the debug print of the pci bars
H Hartley Sweeten [Thu, 19 Jul 2012 01:46:50 +0000 (18:46 -0700)]
staging: comedi: cb_pcimdas: remove the debug print of the pci bars

Remove the dev_dbg output of the pci addresses. It's just add noise.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: cb_pcimdas: cleanup "find pci device" code
H Hartley Sweeten [Thu, 19 Jul 2012 01:46:27 +0000 (18:46 -0700)]
staging: comedi: cb_pcimdas: cleanup "find pci device" code

Add a couple local variables to make the tests more concise.

Reorder the tests to make the for() loop checking for a
matching boardtype quicker.

Use ARRAY_SIZE() to determine the number of boards instead
of the hard-coded '1'.

Drop the dev_dbg for a match. It's just add noise.

Reword the dev_err when no match is found.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: cb_pcimdas: factor out the "find pci device" code
H Hartley Sweeten [Thu, 19 Jul 2012 01:46:07 +0000 (18:46 -0700)]
staging: comedi: cb_pcimdas: factor out the "find pci device" code

Factor the "find pci device" code out of the attach function.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: cb_pcidio: remove the private data
H Hartley Sweeten [Thu, 19 Jul 2012 01:45:26 +0000 (18:45 -0700)]
staging: comedi: cb_pcidio: remove the private data

The private data is no longer needed by this driver. Remove the
struct, devpriv macro, and the allocation.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>