Erik Arfvidson [Tue, 5 May 2015 22:37:06 +0000 (18:37 -0400)]
staging: unisys: remove timskmod.h and procobjecttree.h
This patch move the needed linux include files from timskmod.h
to the files that calls those include. Also procobjecttree.h is
removed since it is dead code.
Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Erik Arfvidson [Tue, 5 May 2015 22:37:04 +0000 (18:37 -0400)]
staging: unisys: move timskmod.h functionality
This patch removes all timksmod.h pound defines. It also removes
visorkmodutils.c since it no longer has any use by itself. Since
visorkmodutils.c is no longer needed the module_init for
visorchipset.c is modified to call visorutil_spar_detect directly
instead of the extern variable in timksmod.h.
Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Prarit Bhargava [Tue, 5 May 2015 22:37:02 +0000 (18:37 -0400)]
staging: unisys: add acpi pnp driver
According to Unisys, another OS detects the PNP0A07 as the auto load
device. We can also do this in the linux kernel by simply converting the
driver over to the ACPI driver model.
Notes: This changes the usage of __init and it had to be removed from some
functions to avoid a !__init function calling an __init function.
Additionally I also cleaned up the headers in visorchipset.c since I was
adding a header file.
visorchannel's signal code should call visorchannel_write() directly.
This is more consistent and cleaner, and allows us to remove the last
memregion call.
Jes Sorensen [Tue, 5 May 2015 22:36:55 +0000 (18:36 -0400)]
staging: unisys: visorchannel_read(): Use memcpy_fromio() directly
Note, this changes the behavior of visorchannel_read(). The old code
would return the channel header, if the offset argument was 0, and the
caller tried to read beyond the size of the visorchannel. Note this
only worked for offset == 0, but not for
(offset > 0) && (offset < header_size), which was inconsistent.
The new implementation returns an error if someone tries to read
beyond the visorchannel size.
David Kershner [Tue, 5 May 2015 22:36:39 +0000 (18:36 -0400)]
staging: unisys: remove server crust from visorchipset.
The visorchipset driver originally serviced both servers and
clients. This implementation is client only so remove some
more server side implementation.
Signed-off-by: David Kershner <david.kershner@unisys.com> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jes Sorensen [Tue, 5 May 2015 22:36:32 +0000 (18:36 -0400)]
staging: unisys: memregion: Embed memregion in struct channel
This changes the API for visor_memregion_create() to require a
pre-allocated struct memregion. Embedding this in struct channel
avoids a layer of additional kmalloc()'s and error checks.
Prarit Bhargava [Tue, 5 May 2015 22:36:19 +0000 (18:36 -0400)]
staging: unisys: fix sig_read_data and sig_read_data functions
The sig_read_data() and sig_write_data() functions are involved in 2 steps
of calls. They really don't need to be and this makes for much simpler
code.
The error handling in this function was broken and while looking at that
I noticed that the whole function was in need of cleanup. This patch
fixes the error handling, specifically
if (!p) {
visorchannel_destroy(p);
channel = NULL;
}
and does a lot of cleanup. I also verified that the called functions
returned correct errors, and that led to a change in
visor_memregion_resize(), visorchannel_destroy() and
visor_memregion_destroy().
Prarit Bhargava [Tue, 5 May 2015 22:36:16 +0000 (18:36 -0400)]
staging: unisys: cleanup visorbus_private.h
visorbus_private.h contains code that is called from visorbus into the
visorchipset code. Now that the visorchipset code has been brought into
the visorbus directory, many of the declarations are not necessary and
can be cleaned up.
TODO: PARSER_WHICH_STRING enum only has one member used
(PARSERSTRING_NAME).
TODO: crash_obj_type appears to be unnecessary in the overall scheme of
code.
Prarit Bhargava [Tue, 5 May 2015 22:36:15 +0000 (18:36 -0400)]
staging: unisys: move visorchipset files to visorbus
Move visorchipset_main.c and visorchipset.h to visorbus/visorchipset.c and
visorbus/visorbus_private.h. This leaves an empty visorchipset directory
which can also be destroyed.
As a result of this patch the visorchipset init code now calls the
visorbus_init() directly. Similarily the visorchipset exit code now
cleans up by calling visorbus_exit().
Prarit Bhargava [Tue, 5 May 2015 22:36:07 +0000 (18:36 -0400)]
staging: unisys: unify devmajorminor attributes into visorbus_main.c
The code in devmajorminor_attr.[ch] only creates sysfs files and is
called only in visorbus_main.c. This code should be unified into
visorbus_main.c. The only changes are a forward declaration issue with
register_devmajorminor_attributes() and making the functions static.
Prarit Bhargava [Tue, 5 May 2015 22:36:06 +0000 (18:36 -0400)]
staging: unisys: unify channel attributes into visorbus_main.c
The code in channel_attr.[ch] only creates sysfs files and is called
only in visorbus_main.c. This code should be unified into
visorbus_main.c. There are some functions that have been made static.
Prarit Bhargava [Tue, 5 May 2015 22:36:05 +0000 (18:36 -0400)]
staging: unisys: unify businst attributes into visorbus_main.c
The code in businst_attr.[ch] only creates sysfs files and is called
only in visorbus_main.c. This code should be unified into
visorbus_main.c. There are some functions that have been made static.
Don Zickus [Tue, 5 May 2015 22:36:04 +0000 (18:36 -0400)]
staging: unisys: Remove unused driver
The visorchannel feature is rolled into visorbus now and its headers
are public under visorbus.h. Remove the unused driver, the old
header file and all the ccflag includes in the Makefile.
Also remove VISORCHANNEL from all Kconfigs as it is not needed.
Signed-off-by: Don Zickus <dzickus@redhat.com> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Don Zickus [Tue, 5 May 2015 22:36:02 +0000 (18:36 -0400)]
staging: unisys: Dissolve visorchannel.h
This header is needed by other drivers and should be in a global namespace.
In addition, functionally it is part of visorbus, so roll the contents
into that header file.
Signed-off-by: Don Zickus <dzickus@redhat.com> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Don Zickus [Tue, 5 May 2015 22:36:01 +0000 (18:36 -0400)]
staging: unisys: Move visorchannel into visorbus
visorchannel seems to be a necessary component to visorbus and can never
function as a standalone module. Let's treat it like a visorbus feature
that is always enabled.
Signed-off-by: Don Zickus <dzickus@redhat.com> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Erik Arfvidson [Tue, 5 May 2015 22:36:00 +0000 (18:36 -0400)]
staging: unisys: add visorbus driver
This base driver provides bus functionality to visorhid, visorhba,
and visornic which will be later added to our driver base. Visorbus
supports sPar bus model and manages bus specific functionality. It
maintains the sysfs subtree /sys/devices/visorbus*/.It is
responsible for device creation and destruction of the devices on
its bus.
Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
struct timeval tv is used to get current time.
32-bit systems using 'struct timeval' will break in the year 2038, so
we have to replace that code with more appropriate types.
Paul Gortmaker [Fri, 1 May 2015 01:47:46 +0000 (21:47 -0400)]
drivers/staging: include <module.h> for modular android tegra_ion code
This file is built off of a tristate Kconfig option and also contains
modular function calls so it should explicitly include module.h to
avoid compile breakage during header shuffles done in the future.
Paul Gortmaker [Mon, 27 Apr 2015 05:25:40 +0000 (01:25 -0400)]
rtl8192u: delete another embedded instance of generic reason codes
We have global copies of all these reason codes. We don't need local
copies. Worse is that these seem totally unused; a grep for some of
the fields comes up empty, and it still compiles after its complete
removal.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Paul Gortmaker [Mon, 27 Apr 2015 05:25:39 +0000 (01:25 -0400)]
rtl8192u: don't duplicate ieee80211 constants for status/auth/reason
These are all defined as a part of the standard and should not be
duplicated on a per-driver basis. Use the global ones and delete the
local ones.
In switching to <linux/ieee80211.h> we have to delete a local copy of
an identical struct that we prepped earlier to have identical field
names, and we add explicit include <...> where needed in order to
preserve getting a successful compile.
This isn't the totality of duplicated data removed, but it is a start.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Paul Gortmaker [Mon, 27 Apr 2015 05:25:38 +0000 (01:25 -0400)]
rtl8192u: align local ieee80211_wmm_ac_param struct fields with global
The <linux/ieee80211.h> and this local file both have a struct of the
same name. They also have the same field sizes and generally the
same fields, as can be seen here:
Here we just align the local field names with the main system one. Then
we can add an include of the system one and delete the local copy in one
smooth step in a follow-on commit.
Not that the replacement:
for i in `find . -name '*.[ch]'` ; do sed -i 's/ac_aci_acm_aifsn/aci_aifsn/g' $i ; done
for i in `find . -name '*.[ch]'` ; do sed -i 's/ac_ecwmin_ecwmax/cw/g' $i ; done
for i in `find . -name '*.[ch]'` ; do sed -i 's/ac_txop_limit/txop_limit/g' $i ; done
implicitly shows that only one of the three fields is currently used.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>