Aaro Koskinen [Wed, 12 Sep 2012 21:45:43 +0000 (00:45 +0300)]
staging: xgifb: delete bogus video RAM configuration
The driver reconfigures DRAM size register to 8M (regardless what the
actual size was) once the init has been completed, overwriting the
correct value written during the early init. As a result if the driver
is unloaded and reloaded, the user will be limited to 8M video memory
and may lose some of the available video modes.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aaro Koskinen [Wed, 12 Sep 2012 21:45:42 +0000 (00:45 +0300)]
staging: xgifb: setup initial video RAM size for systems without BIOS
On embedded systems without a BIOS, the DRAM sizing register is 0 after
the boot, and the driver thinks we have only 1 MB video memory. On such
cases, use the PCI window size for the initial size. This information
is needed only to create the I/O mapping - the driver will later detect
and configure the memory size correctly. Limit the size to 16 MB as it
should be sufficient for all supported video modes.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Macpaul Lin <macpaul@gmail.com> Cc: Paul Stewart <pstew@chromium.org> Cc: Ben Chan <benchan@chromium.org> Cc: Sage Ahn <syahn@gctsemi.com> Cc: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging:wlan-ng: remove the remaining return at the end of void function
this removes the remaining return which the function actually
wants to return, for that it used goto failed and failed lable
have the return statement at the end of function, which is all
unnecessary, remove this and make the function return at the
places where it does the goto failed
staging:wlan-ng: remove all the return statements at the end of functions
this file is having all unnecessary return statements at the end of functions
which return void, remove all of them.
some of the functions still uses the return for having the goto end,
which the label end defined at the end of the function which returns
void, this will be cleaned up in next change
this is because this function does a deinit job and most of the
deinit functions are expected to return void. Also this function
doesn't fail anywhere..
staging: ipack: remove irq field in struct ipack_device.
The field irq currently is identical to the slot number. It does not seem to
have any real use. The number is written to hardware in ipoctal but it seems
the value that is written does not matter.
the ccg_bind_function uses ret variable and a logic around the
ccg_bind_enabled_functions to return a value other than 0 if
bind function fail, other wise returns 0, this can be achieved
with just a return ccg_bind_enabled_functions(dev, c);
Ben Chan [Wed, 12 Sep 2012 18:43:41 +0000 (11:43 -0700)]
staging: gdm72xx: simplify alloc_tx_struct and alloc_rx_struct
This patch simplifies alloc_tx_struct and alloc_rx_struct in gdm_sdio.c
and gdm_usb.c by replacing kmalloc+memset with kzalloc and reorganizing
the code.
Signed-off-by: Ben Chan <benchan@chromium.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Staging: ipack/devices/ipoctal: Clean up device removal.
Make use of dev_set_drvdata() and dev_get_drvdata() to store and obtain
a pointer to the ipoctal struct corresponding to a struct dev.
Previously we relied on a private list of devices.
Rename __tpci_request_irq() to tpci_enable_irq() and __tpci_free_irq()
to tpci_disable_irq(). Change their second argument, move them above
tpci200_interrupt(), and use tpci_disable_irq() in the latter
Staging: ipack/bridges/tpci200: Clean up interrupt handling.
Previously the return value from tpci200_interrupt was not quite correct
if a slot had caused an interrupt but no handler was instellalled:
IRQ_NONE was returned. However in this case we react to the interrupt
by disabling the IPack device interrupt.
Basically there are two cases the code now distinguishes:
- The tpci200 has raised an interrupt. We handle it and return
IRQ_HANDLED.
- Our device did not raise an interrupt. We return IRQ_NONE.
Staging: ipack/bridges/tpci200: Protect device registers with spinlock.
Some of the device registers are accessed from both interrupt and
non-interrupt context. To ensure proper read-modify-write modification
of these registers we can not use the "global" tpci200 mutex. Instead
a spin-lock is used.
In tpci200_request_irq as well as tpci200_free_irq we set and unset the
pointer to struct slot_irq. This pointer is accessed in
tpci200_interrupt. To ensure that the pointer is not freed after it has
been fetched in tpci200_interrupt() it is now protected through RCU.
Staging: ipack/devices/ipoctal: put ipoctal_channel into tty->driver_data.
Each tty's driver_data is now pointing to the channel it is talking to. struct
ipoctal_channel contains all the information the callbacks require to do their
work.
Staging: ipack/devices/ipoctal: split ipoctal_channel from ipoctal.
By moving everything channel related into a separate struct we will be
able to clean up a lot of code. In the end tty->driver_data will no
longer need to point to ipoctal but instead can point to the respective
channel.
Macpaul Lin [Wed, 12 Sep 2012 09:49:24 +0000 (17:49 +0800)]
staging/gdm72xx: gdm_usb coding style clean up
gdm_usb.* coding style clean up.
Signed-off-by: Macpaul Lin <macpaul@gmail.com> Cc: Paul Stewart <pstew@chromium.org> Cc: Ben Chan <benchan@chromium.org> Cc: Sage Ahn <syahn@gctsemi.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
@unchanged exists@
position r.p1,r.p2;
expression e <= r.x,x,e1;
iterator I;
statement S;
@@
if (x@p1 == NULL) { ... when != I(x,...) S
when != e = e1
when != e += e1
when != e -= e1
when != ++e
when != --e
when != e++
when != e--
when != &e
kfree@p2(x); ... return ...; }
@ok depends on unchanged exists@
position any r.p1;
position r.p2;
expression x;
@@
... when != true x@p1 == NULL
kfree@p2(x);
@depends on !ok && unchanged@
position r.p2;
expression x;
@@
*kfree@p2(x);
// </smpl>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
@unchanged exists@
position r.p1,r.p2;
expression e <= r.x,x,e1;
iterator I;
statement S;
@@
if (x@p1 == NULL) { ... when != I(x,...) S
when != e = e1
when != e += e1
when != e -= e1
when != ++e
when != --e
when != e++
when != e--
when != &e
kfree@p2(x); ... return ...; }
@ok depends on unchanged exists@
position any r.p1;
position r.p2;
expression x;
@@
... when != true x@p1 == NULL
kfree@p2(x);
@depends on !ok && unchanged@
position r.p2;
expression x;
@@
*kfree@p2(x);
// </smpl>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Kevin McKinney [Wed, 12 Sep 2012 02:19:06 +0000 (22:19 -0400)]
Staging: bcm: Create and initialize new device id in InterfaceInit
This patch create and initalizes a new device
id of 0x172 as reported by Rinat Camalov
<richman1000000d@gmail.com>. In addition, a
comment is added to the potential invalid
existing device id.
The legacy attach used the "dummy" boardinfo entry to allow
matching a boardinfo to a pci card based on the "name" passed
by the comedi core. This driver now uses the PCI auto config
mechanism which always matches to the PCI vendor/device ids.
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>
The 'valid' variable in the private data is only used in the
detach of the board to determine if the pci1710_reset() function
can be called. That function only requires a valid dev->iobase
to work. Use that for the check instead and remove the unneeded
variable 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>
staging: comedi: adv_pci1710: use attach_pci callback
Convert this PCI driver to use the comedi PCI auto config attach
mechanism by adding an 'attach_pci' callback function. Since the
driver does not require any external configuration options, and
the legacy 'attach' callback is now optional, 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>
staging: comedi: icp_multi: use attach_pci callback
Convert this PCI driver to use the comedi PCI auto config attach
mechanism by adding an 'attach_pci' callback function. Since the
driver does not require any external configuration options, and
the legacy 'attach' callback is now optional, remove it. The
boardinfo is also not needed now so remove it also.
This also allows removing the icp_multi.h header completely.
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>
staging: comedi: icp_multi: remove rangecode from boardinfo
The analog inputs and outputs for this driver use the same table
to set the analog range. Remove the boardinfo for it and just
reference the table directly.
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>
staging: comedi: icp_multi: remove n_aichan from boardinfo
There is only one board type supported by this driver and the
number of analog input channels is constant. Remove the
boardinfo for it and just open-code the value.
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>
staging: comedi: icp_multi: remove n_aochan from boardinfo
There is only one board type supported by this driver and the
number of analog output channels is constant. Remove the
boardinfo for it and just open-code the value.
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>
staging: comedi: icp_multi: remove n_dichan from boardinfo
There is only one board type supported by this driver and the
number of digital input channels is constant. Remove the
boardinfo for it and just open-code the value.
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>
staging: comedi: icp_multi: remove n_dochan from boardinfo
There is only one board type supported by this driver and the
number of digital output channels is constant. Remove the
boardinfo for it and just open-code the value.
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>
staging: comedi: icp_multi: remove n_ctrs from boardinfo
There is only one board type supported by this driver and the
number of counter channels is constant. Remove the boardinfo
for it and just open-code the value.
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>
staging: comedi: icp_multi: convert to a pci_driver
This driver is for a PCI device not a legacy device.
Convert it from a module_comedi_driver to a module_comedi_pci_driver.
This will allow using the comedi_pci_auto_config mechanism to attach
to the device.
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>