1
0
Fork 0
Commit Graph

104 Commits (579b9239c1f38665b21e8d0e6ee83ecc96dbd6bb)

Author SHA1 Message Date
Paul Gortmaker 0af61e66ee drivers/staging: make emxx_udc.c explicitly non-modular
The Kconfig currently controlling compilation of this code is:

drivers/staging/emxx_udc/Kconfig:config USB_EMXX
drivers/staging/emxx_udc/Kconfig:       bool "EMXX USB Function Device Controller"

...meaning that it currently is not being built as a module by anyone.

Lets remove the modular code that is essentially orphaned, so that
when reading the driver there is no doubt it is builtin-only.

Since module_platform_driver() uses the same init level priority as
builtin_platform_driver() the init ordering remains unchanged with
this commit.

The .remove function was declared __exit, so it wouldn't have been
available for a sysfs bind/unbind anyway, so lets be explicit here and
use ".suppress_bind_attrs = true" to prevent root from doing something
silly.

We also delete the MODULE_LICENSE tag etc. since all that information
is already contained at the top of the file in the comments.

Cc: Vincenzo Scotti <vinc94@gmail.com>
Cc: Haneen Mohammed <hamohammed.sa@gmail.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Roberta Dobrescu <roberta.dobrescu@gmail.com>
Cc: Tapasweni Pathak <tapaswenipathak@gmail.com>
Cc: Peter Chen <peter.chen@freescale.com>
Cc: Robert Baldyga <r.baldyga@samsung.com>
Cc: Chris Rorvick <chris@rorvick.com>
Cc: "Gujulan Elango, Hari Prasath (H.)" <hgujulan@visteon.com>
Cc: devel@driverdev.osuosl.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-12 21:12:17 -07:00
Cristina Moraru 2866914ce1 staging:emxx_udc: Fixed comparison style warnings
Fixed 'Comparisons should place the constant on the right side of the
test' Warnings

Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-30 04:02:58 +02:00
Ravi Teja Darbha f2b29165c5 staging: emxx_udc: Remove unused parameter from function parameter list parameter list
struct nbu2ss_ep *ep parameter in functions _nbu2ss_ep0_in_transfer()
and _nbu2ss_ep0_out_transfer() is not used anywhere inside. Hence,
removed.

Signed-off-by: Ravi Teja Darbha <ravi2j@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:52 -07:00
Ravi Teja Darbha c648a57ae5 staging: emxx_udc: Remove cleanup1 label
The cleanup1 label does nothing but return. Better way is to return
immediately instead of using goto. Hence, removed.

Signed-off-by: Ravi Teja Darbha <ravi2j@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:52 -07:00
Ravi Teja Darbha 706eb8cfb1 staging: emxx_udc: Fix NULL comparison style
Fixed NULL comparison style as suggested by checkpatch.pl

Signed-off-by: Ravi Teja Darbha <ravi2j@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:52 -07:00
Ravi Teja Darbha b68ff8f61e staging: emxx_udc: Avoid using multiple blank lines
Fixed multiple blank lines warning by checkpatch.pl

Signed-off-by: Ravi Teja Darbha <ravi2j@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:51 -07:00
Ravi Teja Darbha 446be1b553 staging: emxx_udc: Remove FSF mailing address
FSF mailing address is no longer required to be specified. Hence
removed.

Signed-off-by: Ravi Teja Darbha <ravi2j@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:51 -07:00
Robert Baldyga 68b5c94751 staging: emxx_udc: add ep capabilities support
Convert endpoint configuration to new capabilities model.

Fixed typo in "epc-nulk" to "epc-bulk".

Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-08-04 12:25:31 -05:00
Robert Baldyga cb009d6e0b staging: emxx_udc: add missing usb_ep_set_maxpacket_limit()
Since maxpacket_limit was introduced all UDC drivers should use
usb_ep_set_maxpacket_limit() function instead of setting maxpacket value
manually. ep.maxpacket_limit contains actual maximum maxpacket value
supported by hardware which is needed by epautoconf.

Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-07-31 08:58:02 -05:00
Hari Prasath Gujulan Elango f194f4e9e5 staging: emxx_udc: remove commented code
This patch removes commented code warned by checkpatch.pl

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-15 21:56:37 -07:00
Madhusudhanan Ravindran f51cd2b7d1 staging: emxx_udc: remove commented code
removed the commented INFO lines.

Signed-off-by: Madhusudhanan Ravindran <mravindr@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-08 13:33:40 -07:00
Carlos E. Garcia 69e98df782 Staging: fixed multiple spelling errors.
Fixed multiple spelling errors.

Signed-off-by: Carlos E. Garcia <carlos@cgarcia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:23:58 +02:00
Gujulan Elango, Hari Prasath (H.) 9436165544 staging: emxx_udc: Remove dead code
This patch removes few lines of commented code.

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-30 16:52:21 +02:00
Gujulan Elango, Hari Prasath (H.) 3e2bb64d1a staging: emxx_udc : remove stray semicolon
This patch removes a stray semicolon around closing brace of an if code
block.

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-30 16:52:21 +02:00
Julia Lawall bd7de5cea2 staging: emxx_udc: test returned value
Put NULL test on the result of the previous call instead on one of its
arguments.  A simplified version of the semantic match that finds this
problem is as follows (http://coccinelle.lip6.fr/):

// <smpl>
r@
expression *e1;
expression *e2;
identifier f;
statement S1,S2;
@@

e1 = f(...,e2,...);
(
if (e1 == NULL || ...) S1 else S2
|
*if (e2 == NULL || ...) S1 else S2
)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-30 16:52:21 +02:00
Haneen Mohammed 93275c8068 Staging: emuxx_udc: replace pr_* with dev_*
dev_* is prefered over pr_* when appropriate dev structure is present.
This patch replace pr_info and pr_warn with its dev_ counterpart.

Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-16 16:28:31 +01:00
Somya Anand ca3d253eb9 Staging: emxx_udc: Iterate list using list_for_each_entry
Code using doubly linked list is iterated generally  using list_empty and
list_entry functions, but it can be better written using list_for_each_entry
macro.

This patch replaces the while loop containing list_empty and list_entry with
list_for_each_entry and list_for_each_entry_safe. list_for_each_entry is a
macro which is used to iterate over a list of given type. So while loop used to
iterate over a list can be replaced with list_for_each_entry macro. However, if
list_del is used in the loop, then list_for_each_entry_safe is a better choice.
This transformation is done by using the following coccinelle script.

@ rule1 @
expression E1;
identifier I1, I2;
type T;
iterator name list_for_each_entry;
@@

- while (list_empty(&E1) == 0)
+ list_for_each_entry (I1, &E1, I2)
 {
	...when != T *I1;
- 	I1 = list_entry(E1.next, T, I2);
    ...when != list_del(...);
       when != list_del_init(...);
 }

@ rule2  @
expression E1;
identifier I1, I2;
type T;
iterator name list_for_each_entry_safe;
@@
   T *I1;
+  T *tmp;
  ...
- while (list_empty(&E1) == 0)
+ list_for_each_entry_safe (I1, tmp, &E1, I2)
 {
	...when != T *I1;
- 	I1 = list_entry(E1.next, T, I2);
    ...
 }

Signed-off-by: Somya Anand <somyaanand214@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-16 16:23:43 +01:00
Haneen Mohammed f737ea50ba Staging: emxx_udc: Remove custom printk macro ERR
This patch removes custom printk macro ERR.
All the calls to this macro were replaced by de_err and pr_err.

Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 09:54:26 -08:00
Haneen Mohammed 886892798c Staging: emxx_udc: Replace custom printk macro ERR with dev_err or pr_err
This patch removes the use of custom printk macros ERR and replace it
with dev_err, or pr_err in the following cases:
- if no appropriate struct device *dev field where found for dev_err.
- or dev could be null eg. "dev_err(udc->dev" not possible inside "if
  (udc == null)"
Issue addressed by checkpatch.pl.

Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 09:54:26 -08:00
Haneen Mohammed d45c4c654d Staging: emxx_udc: Remove argument test from function
This patch removes the test statement for an argument to  _nbu2ss_pullup
function, for it can't be null due to previous derefrences.

Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 09:54:26 -08:00
Haneen Mohammed f6ef6c094e Staging: emxx_udc: Fix do not add new typedefs and remove volatile
This patch fixes the following checkpatch.pl warnings:"do not add new
typedefs" and "Use of volatile is usually wrong".
Remove typedefs keyword and rename identifiers appropriately.
Remove volatile from union usb_regs_access
Update related  files.

Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 09:54:26 -08:00
Aya Mahfouz 410c944eda staging: emxx_udc: rewrite the right hand side of an assignment
This patch rewrites the right hand side of an assignment for
expressions of the form:
a = (a <op> b);
to be:
a <op>= b;
where <op> = << | >>.

This issue was detected and resolved using the following
coccinelle script:

@@
identifier i;
expression e;
@@

-i = (i >> e);
+i >>= e;

@@
identifier i;
expression e;
@@

-i = (i << e);
+i <<= e;

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-26 15:24:16 -08:00
Vatika Harlalka ce5aebd678 Staging: emxx_udc: Convert from __attribute__((aligned(size))) to __aligned(size)
This patch addresses the checkpatch.pl warning
WARNING: __aligned(size) is preferred over __attribute__((aligned(size)))

aligned(x) is a macro :
#define __aligned(x)                   __attribute__((aligned(x)))

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-24 15:28:35 -08:00
Tapasweni Pathak 4a0721bf84 staging: emxx_udc: Replace GFP_KERNEL with GFP_ATOMIC
To avoid deadlock, do not call blocking functions with spinlocks held.

Replace GFP_KERNEL with GFP_ATOMIC, as the latter will fail if the pile
doesn't have enough free pages but will not sleep and hence deadlock can
be avoided.

Found by Coccinelle.

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-24 15:28:35 -08:00
Linus Torvalds b11a278397 Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Pull kconfig updates from Michal Marek:
 "Yann E Morin was supposed to take over kconfig maintainership, but
  this hasn't happened.  So I'm sending a few kconfig patches that I
  collected:

   - Fix for missing va_end in kconfig
   - merge_config.sh displays used if given too few arguments
   - s/boolean/bool/ in Kconfig files for consistency, with the plan to
     only support bool in the future"

* 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
  kconfig: use va_end to match corresponding va_start
  merge_config.sh: Display usage if given too few arguments
  kconfig: use bool instead of boolean for type definition attributes
2015-02-19 10:36:45 -08:00
Linus Torvalds 46f7b63556 Staging drivers patches for 3.20-rc1
Here's the big staging driver tree update for 3.20-rc1.  Lots of little
 things in here, adding up to lots of overall cleanups.  The IIO driver
 updates are also in here as they cross the staging tree boundry a lot.
 I2O has moved into staging as well, as a plan to drop it from the tree
 eventually as that's a dead subsystem.
 
 All of this has been in linux-next with no reported issues for a while.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iEYEABECAAYFAlTgtVQACgkQMUfUDdst+yk4mACgshYZ1fOQDoPR+BXd+QD1HXfh
 GosAoICXkSjDQjwVo13W6QHIVMsUezY+
 =4jHr
 -----END PGP SIGNATURE-----

Merge tag 'staging-3.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging drivers patches from Greg KH:
 "Here's the big staging driver tree update for 3.20-rc1.

  Lots of little things in here, adding up to lots of overall cleanups.
  The IIO driver updates are also in here as they cross the staging tree
  boundry a lot.  I2O has moved into staging as well, as a plan to drop
  it from the tree eventually as that's a dead subsystem.

  All of this has been in linux-next with no reported issues for a
  while"

* tag 'staging-3.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (740 commits)
  staging: lustre: lustre: libcfs: define symbols as static
  staging: rtl8712: Do coding style cleanup
  staging: lustre: make obd_updatemax_lock static
  staging: rtl8188eu: core: switch with redundant cases
  staging: rtl8188eu: odm: conditional setting with no effect
  staging: rtl8188eu: odm: condition with no effect
  staging: ft1000: fix braces warning
  staging: sm7xxfb: fix remaining CamelCase
  staging: sm7xxfb: fix CamelCase
  staging: rtl8723au: multiple condition with no effect - if identical to else
  staging: sm7xxfb: make smtc_scr_info static
  staging/lustre/mdc: Initialize req in mdc_enqueue for !it case
  staging/lustre/clio: Do not allow group locks with gid 0
  staging/lustre/llite: don't add to page cache upon failure
  staging/lustre/llite: Add exception entry check after radix_tree
  staging/lustre/libcfs: protect kkuc_groups from write access
  staging/lustre/fld: refer to MDT0 for fld lookup in some cases
  staging/lustre/llite: Solve a race to access lli_has_smd in read case
  staging/lustre/ptlrpc: hold rq_lock when modify rq_flags
  staging/lustre/lnet: portal spreading rotor should be unsigned
  ...
2015-02-15 11:30:39 -08:00
Chris Rorvick 737fee1bf6 staging: emxx_udc: Remove nbu2ss_drv_set_dp_info()
This function is an awkward helper for nbu2ss_drv_ep_init().  Most of
its logic is devoted to determining if the current endpoint is ep0,
something the caller can easily do in a single line.  And there is not
a lot going on beyond that.

Move this logic up into nbu2ss_drv_ep_init().  The result is much easier
to understand and the resulting function is still viewable within a
single screen.

Signed-off-by: Chris Rorvick <chris@rorvick.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-07 17:15:43 +08:00
Peter Chen 1fa2df0c70 staging: emxx_udc: fix the build error
Fix below build error:

reproduce:
  wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
  chmod +x ~/bin/make.cross
  git checkout 9239d88fc5
  # save the attached .config to linux build tree
  make.cross ARCH=arm

All error/warnings:

   In file included from include/linux/seqlock.h:35:0,
                    from include/linux/time.h:5,
                    from include/linux/stat.h:18,
                    from include/linux/module.h:10,
                    from drivers/staging/emxx_udc/emxx_udc.c:22:
   drivers/staging/emxx_udc/emxx_udc.c: In function 'nbu2ss_gad_set_selfpowered':
>> drivers/staging/emxx_udc/emxx_udc.c:3129:21: error: 'udc' undeclared (first use in this function)
     spin_lock_irqsave(&udc->lock, flags);
                        ^
   include/linux/spinlock.h:215:34: note: in definition of macro 'raw_spin_lock_irqsave'
      flags = _raw_spin_lock_irqsave(lock); \
                                     ^
>> drivers/staging/emxx_udc/emxx_udc.c:3129:2: note: in expansion of macro 'spin_lock_irqsave'
     spin_lock_irqsave(&udc->lock, flags);
     ^
   drivers/staging/emxx_udc/emxx_udc.c:3129:21: note: each undeclared identifier is reported only once for each function it appears in
     spin_lock_irqsave(&udc->lock, flags);
                        ^
   include/linux/spinlock.h:215:34: note: in definition of macro 'raw_spin_lock_irqsave'
      flags = _raw_spin_lock_irqsave(lock); \
                                     ^
>> drivers/staging/emxx_udc/emxx_udc.c:3129:2: note: in expansion of macro 'spin_lock_irqsave'
     spin_lock_irqsave(&udc->lock, flags);
     ^

vim +/udc +3129 drivers/staging/emxx_udc/emxx_udc.c

33aa8d45 Magnus Damm 2014-06-06  3123
33aa8d45 Magnus Damm 2014-06-06  3124  	if (pgadget == NULL) {
33aa8d45 Magnus Damm 2014-06-06  3125  		ERR("%s, bad param\n", __func__);
33aa8d45 Magnus Damm 2014-06-06  3126  		return -EINVAL;
33aa8d45 Magnus Damm 2014-06-06  3127  	}
33aa8d45 Magnus Damm 2014-06-06  3128
33aa8d45 Magnus Damm 2014-06-06 @3129  	spin_lock_irqsave(&udc->lock, flags);
9239d88f Peter Chen  2015-01-28  3130  	pgadget->is_selfpowered = (is_selfpowered != 0);
33aa8d45 Magnus Damm 2014-06-06  3131  	spin_unlock_irqrestore(&udc->lock, flags);
33aa8d45 Magnus Damm 2014-06-06  3132

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-02-04 11:16:47 -06:00
Peter Chen 9239d88fc5 staging: emxx_udc: use common is_selfpowered
Delete private selfpowered variable, and use common one.

Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-01-29 10:32:48 -06:00
Christoph Jaeger 6341e62b21 kconfig: use bool instead of boolean for type definition attributes
Support for keyword 'boolean' will be dropped later on.

No functional change.

Reference: http://lkml.kernel.org/r/cover.1418003065.git.cj@linux.com
Signed-off-by: Christoph Jaeger <cj@linux.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2015-01-07 13:08:04 +01:00
Linus Torvalds dab363f938 Staging patches for 3.19-rc1
Here's the big staging tree pull request for 3.19-rc1.
 
 We continued to delete more lines than were added, always a good thing,
 but not at a huge rate this release, only about 70k lines removed
 overall mostly from removing the horrid bcm driver.
 
 Lots of normal staging driver cleanups and fixes all over the place,
 well over a thousand of them, the shortlog shows all the horrid details.
 
 The "contentious" thing here is the movement of the Android binder code
 out of staging into the "real" part of the kernel.  This is code that
 has been stable for a few years now and is working as-is in the tens of
 millions of devices with no issues.  Yes, the code is horrid, and the
 userspace api leaves a lot to be desired, but it's not going to change
 due to legacy issues that we have no control over.  Because so many
 devices and companies rely on this, and the code is stable, might as
 well promote it out of staging.
 
 This was all discussed at the Linux Plumbers conference, and everyone
 participating agreed that this was the best way forward.
 
 There is work happening to replace the binder code with something new
 that is happening right now, but I don't expect to see the results of
 that work for another year at the earliest.  If that ever happens, and
 Android switches over to it, I'll gladly remove this version.
 
 As for maintainers, I'll be glad to maintain this code, I've been doing
 it for the past few years with no problems.  I'll send a MAINTAINERS
 entry for it before 3.19-final is out, still need to talk to the Google
 developers about if they are willing to help with it or not, last I
 checked they were, which was good.
 
 All of these patches have been in linux-next for a while with no
 reported issues.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iEYEABECAAYFAlSPICkACgkQMUfUDdst+yksdwCfSLE9VUy1o2sAPDRe+J3bQced
 EWEAoL3RtnejKbo5tHS2IT69pLrwiIDS
 =YXyM
 -----END PGP SIGNATURE-----

Merge tag 'staging-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging driver updates from Greg KH:
 "Here's the big staging tree pull request for 3.19-rc1.

  We continued to delete more lines than were added, always a good
  thing, but not at a huge rate this release, only about 70k lines
  removed overall mostly from removing the horrid bcm driver.

  Lots of normal staging driver cleanups and fixes all over the place,
  well over a thousand of them, the shortlog shows all the horrid
  details.

  The "contentious" thing here is the movement of the Android binder
  code out of staging into the "real" part of the kernel.  This is code
  that has been stable for a few years now and is working as-is in the
  tens of millions of devices with no issues.  Yes, the code is horrid,
  and the userspace api leaves a lot to be desired, but it's not going
  to change due to legacy issues that we have no control over.  Because
  so many devices and companies rely on this, and the code is stable,
  might as well promote it out of staging.

  This was all discussed at the Linux Plumbers conference, and everyone
  participating agreed that this was the best way forward.

  There is work happening to replace the binder code with something new
  that is happening right now, but I don't expect to see the results of
  that work for another year at the earliest.  If that ever happens, and
  Android switches over to it, I'll gladly remove this version.

  As for maintainers, I'll be glad to maintain this code, I've been
  doing it for the past few years with no problems.  I'll send a
  MAINTAINERS entry for it before 3.19-final is out, still need to talk
  to the Google developers about if they are willing to help with it or
  not, last I checked they were, which was good.

  All of these patches have been in linux-next for a while with no
  reported issues"

* tag 'staging-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (1382 commits)
  Staging: slicoss: Fix long line issues in slicoss.c
  staging: rtl8712: remove unnecessary else after return
  staging: comedi: change some printk calls to pr_err
  staging: rtl8723au: hal: Removed the extra semicolon
  lustre: Deletion of unnecessary checks before three function calls
  staging: lustre: fix sparse warnings: static function declaration
  staging: lustre: fixed sparse warnings related to static declarations
  staging: unisys: remove duplicate header
  staging: unisys: remove unneeded structure
  staging: ft1000 : replace __attribute ((__packed__) with __packed
  drivers: staging: rtl8192e: Include "asm/unaligned.h" instead of "access_ok.h" in "rtl819x_BAProc.c"
  Drivers:staging:rtl8192e: Fixed checkpatch warning
  Drivers:staging:clocking-wizard: Added a newline
  staging: clocking-wizard: check for a valid clk_name pointer
  staging: rtl8723au: Hal_InitPGData() avoid unnecessary typecasts
  staging: rtl8723au: _DisableAnalog(): Avoid zero-init variables unnecessarily
  staging: rtl8723au: Remove unnecessary wrapper _ResetDigitalProcedure1()
  staging: rtl8723au: _ResetDigitalProcedure1_92C() reduce code obfuscation
  staging: rtl8723au: Remove unnecessary wrapper _DisableRFAFEAndResetBB()
  staging: rtl8723au: _DisableRFAFEAndResetBB8192C(): Reduce code obfuscation
  ...
2014-12-15 18:06:13 -08:00
Tapasweni Pathak 3f3efca9c5 staging: emxx_udc: use USB API functions rather than constants
This patch introduces the use of the functions usb_endpoint_type and
usb_endpoint_num.

The Coccinelle semantic patch that makes these changes is as follows:

@@ struct usb_endpoint_descriptor *epd; @@

- (epd->bEndpointAddress & \(USB_ENDPOINT_NUMBER_MASK\|0x0f\))
+ usb_endpoint_num(epd)

@@ struct usb_endpoint_descriptor *epd; @@

- (epd->bmAttributes & \(USB_ENDPOINT_XFERTYPE_MASK\|3\))
+ usb_endpoint_type(epd)

Build Tested it.

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-30 13:20:42 -07:00
Tapasweni Pathak a5a89d7a84 staging: emxx_udc: Remove null check before kfree
This patch was generated by the following semantic patch:

// <smpl>
@@ expression E; @@
- if (E != NULL) { kfree(E); }
+ kfree(E);
@@ expression E; @@
- if (E != NULL) { kfree(E); E = NULL; }
+ kfree(E);
+ E = NULL;
// </smpl>

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-23 13:43:46 +08:00
Wolfram Sang 9feba53fb1 staging: emxx_udc: drop owner assignment from platform_drivers
A platform_driver does not need to set an owner, it will be populated by the
driver core.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-10-20 16:21:37 +02:00
Ebru Akagunduz 77d966f4b0 staging: emxx_udc: Use min_t instead of min
Use min_t instead of min function in emxx_udc.c

Fix checkpatch.pl warnings:
WARNING: min() should probably be min_t(u32, iBufSize, ep->ep.maxpacket)
WARNING: min() should probably be min_t(u32, data_size, ep->ep.maxpacket)
WARNING: min() should probably be min_t(u16, udc->ctrl.wLength, sizeof(status_data))

Changes in v2:
 - Fixed min function call as min_t

Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-02 13:51:03 -07:00
Ebru Akagunduz fb71d24bdc staging: emxx_udc: Fix replace printk(KERN_DEBUG ..) with dev_dbg
This patch fixes "Prefer [subsystem eg: netdev]_dbg([subsystem]dev,
... then dev_dbg(dev, ... then pr_debug(...  to printk(KERN_DEBUG"
checkpatch.pl warning in emxx_udc.c

Changes in v2:
 - Fixed dev_debug function call as dev_dbg

Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-02 13:51:03 -07:00
Gulsah Kose 924c6ee1b2 staging: emxx_udc: Fixed else is not usefull warning.
This patch fixes "else is not generally useful after a break or return"
checkpatch.pl warning in emxx_udc.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-28 23:06:43 -04:00
Roberta Dobrescu 666e9084c0 staging: emxx_udc: Do not assign bool to 0/1
This fixes the following coccinelle warning:
WARNING: Assignment of bool to 0/1

Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com>
Acked-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 20:27:58 -07:00
Roberta Dobrescu 5cbca95706 staging: emxx_udc: Do not use comparisons on bool tests
This fixes the following coccinelle warning:
WARNING: Comparison of bool to 0/1

Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com>
Acked-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 20:27:58 -07:00
Roberta Dobrescu 1ff99b312f staging: emxx_udc: Replace __constant_cpu_to_le16 with cpu_to_le16
This fixes the following checkpatch.pl warning:
WARNING: __constant_cpu_to_le16 should be cpu_to_le16
Additionally, it removes the space between function name and (.

Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 17:48:06 -07:00
Vincenzo Scotti 5b1ebbffc0 staging: emxx_udc: fix compile warnings: discarding const qualifier
Signed-off-by: Vincenzo Scotti <vinc94@gmail.com>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 16:10:40 -07:00
Masanari Iida f02935c575 staging: exxx_udc: Convert pr_warning to pr_warn
This patch Convert pr_warning to pr_warn.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 16:08:10 -07:00
Vincenzo Scotti 1fe473b3a2 staging: emxx_udc: fix style warnings: const strings should be const char
Signed-off-by: Vincenzo Scotti <vinc94@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:55:55 -07:00
Vincenzo Scotti 9af928157c staging: emxx_udc: fix style warnings: return in void functions
Signed-off-by: Vincenzo Scotti <vinc94@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:55:55 -07:00
Vincenzo Scotti 7f39ae05ad staging: emxx_udc: fix style warnings: blank line after declarations
Signed-off-by: Vincenzo Scotti <vinc94@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-11 14:55:55 -07:00
Paul Bolle 5e5d744364 staging: emxx_udc: remove check for CONFIG_MACH_EMGR
There's a check for CONFIG_MACH_EMGR. But the Kconfig symbol MACH_EMGR
doesn't exist. Remove that check and the single #define it hides. Note
that this macro isn't used by this driver anyway.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-08 13:48:01 -07:00
Andrew Plummer ce1e3eb723 Staging: emxx_udc: emxx_udc: remove spaces before semicolons
Remove spaces before semicolons to remove checkpatch warnings.

Signed-off-by: Andrew Plummer <plummer574@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30 14:07:38 -07:00
KANG Yuxuan a2c14e9712 staging: emxx_udc: Fix coding style errors
Only fixing errors reported by checkpatch.pl, based on the following
rules:
1. '*' should be adjacent to the data name or function name.
2. Don't use C99-style "// ..." comments.

Signed-off-by: KANG Yuxuan <stonekyx@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-15 21:55:29 -07:00
Sachin Kamat 6de2a1a7b9 staging: emxx_udc: Fix build error
‘strict_strtol’ is deprecated. Use kstrtol instead. Fixes the following
build error:
drivers/staging/emxx_udc/emxx_udc.c:3288:3: error: implicit declaration of function ‘strict_strtol’

Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 11:49:15 -07:00
Sachin Kamat 464cad2c50 staging: emxx_udc: Use module_platform_driver
module_platform_driver removes some boiler plate and makes
code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26 20:59:02 -04:00
Sachin Kamat a790ebc1f0 staging: emxx_udc: Fix build error
devm_request_and_ioremap has been removed since commit c9d53c0f2d
("devres: remove devm_request_and_ioremap()") Use devm_ioremap_resource
instead. While at it, also remove redundant error message as it is now
handled by devm_ioremap_resource. Without this patch we get the following
build error:
drivers/staging/emxx_udc/emxx_udc.c:3370:2: error: implicit declaration of function ‘devm_request_and_ioremap’ [-Werror=implicit-function-declaration]

Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26 20:59:02 -04:00
Magnus Damm 8a62956efd staging: emxx_udc: Add TODO file
Add a TODO file for emxx_udc to show what is left to do.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Acked-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 14:42:48 -07:00
Magnus Damm 96b29cacc7 staging: emxx_udc: I/O memory and IRQ resource support
Adjust the emxx_udc driver to make use of the standard
driver model to pass I/O memory and IRQ as resources
instead of hard coding those things in the driver.

Needs more work - the VBUS signal is yet not handled.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Acked-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 14:42:48 -07:00
Magnus Damm 33aa8d45a4 staging: emxx_udc: Add Emma Mobile USB Gadget driver
Add the emxx_udc driver to staging based on an old linux-2.6.35.7
android tree. The driver has been brushed up slightly to complile
but it is still in great need of cleanup.

At this point DT bindings are clearly lacking and I doubt that the
driver even can run with multiple instances (global variables, hurray!).

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Acked-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 14:42:17 -07:00