Age | Commit message (Collapse) | Author | Files | Lines |
|
USB drivers now support the ability for the driver core to handle the
creation and removal of device-specific sysfs files in a race-free
manner. Take advantage of that by converting the driver to use this by
moving the sysfs attributes into a group and assigning the dev_groups
pointer to it.
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
For all of these, a simple DEVICE_ATTR_*() macro should be used instead,
so convert the drivers to use them.
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Instead of "open coding" a DEVICE_ATTR() define, use the
DEVICE_ATTR_RW() macro instead, which does everything properly instead.
This does require a few static functions to be renamed to work properly,
but thanks to a script from Joe Perches, this was easily done.
Reported-by: Joe Perches <[email protected]>
Cc: Matthieu CASTET <[email protected]>
Cc: Stanislaw Gruszka <[email protected]>
Cc: Peter Chen <[email protected]>
Cc: Mathias Nyman <[email protected]>
Acked-by: Felipe Balbi <[email protected]>
Acked-by: Alan Stern <[email protected]>
Acked-by: Bin Liu <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Now that the SPDX tag is in all USB files, that identifies the license
in a specific and legally-defined manner. So the extra GPL text wording
can be removed as it is no longer needed at all.
This is done on a quest to remove the 700+ different ways that files in
the kernel describe the GPL license text. And there's unneeded stuff
like the address (sometimes incorrect) for the FSF which is never
needed.
No copyright headers or other non-license-description text was removed.
Cc: Keith Packard <[email protected]>
Cc: Juergen Stuber <[email protected]>
Cc: Cesar Miquel <[email protected]>
Cc: Richard Leitner <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
It's good to have SPDX identifiers in all files to make it easier to
audit the kernel tree for correct licenses.
Update the drivers/usb/ and include/linux/usb* files with the correct
SPDX license identifier based on the license text in the file itself.
The SPDX identifier is a legally binding shorthand, which can be used
instead of the full boiler plate text.
This work is based on a script and data from Thomas Gleixner, Philippe
Ombredanne, and Kate Stewart.
Cc: Thomas Gleixner <[email protected]>
Cc: Kate Stewart <[email protected]>
Cc: Philippe Ombredanne <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Acked-by: Felipe Balbi <[email protected]>
Acked-by: Johan Hovold <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
attribute_group are not supposed to change at runtime. All functions
working with attribute_group provided by <linux/sysfs.h> work with
const attribute_group. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Use sysfs_match_string() helper instead of open coded variant.
Signed-off-by: Andy Shevchenko <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
All kmalloc-based functions print enough information on failures.
Signed-off-by: Wolfram Sang <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
None of these files are actually using any __init type directives
and hence don't need to include <linux/init.h>. Most are just a
left over from __devinit and __cpuinit removal, or simply due to
code getting copied from one driver to the next.
Signed-off-by: Paul Gortmaker <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Mark function my_memlen() as static in misc/usbsevseg.c because it is
not used outside this file.
This eliminates the following warning in misc/usbsevseg.c:
drivers/usb/misc/usbsevseg.c:60:15: warning: no previous prototype for ‘my_memlen’ [-Wmissing-prototypes]
Signed-off-by: Rashika Kheria <[email protected]>
Reviewed-by: Josh Triplett <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This changes the max length for the usb seven segment delcom device to 8
from 6. Delcom has both 6 and 8 variants and having 8 works fine with
devices which are only 6.
Signed-off-by: Harrison Metzger <[email protected]>
Signed-off-by: Stuart Pook <[email protected]>
Cc: stable <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This converts the drivers in drivers/usb/* to use the
module_usb_driver() macro which makes the code smaller and a bit
simpler.
Added bonus is that it removes some unneeded kernel log messages about
drivers loading and/or unloading.
Cc: Simon Arlott <[email protected]>
Cc: Duncan Sands <[email protected]>
Cc: Matthieu CASTET <[email protected]>
Cc: Stanislaw Gruszka <[email protected]>
Cc: Pete Zaitcev <[email protected]>
Cc: Oliver Neukum <[email protected]>
Cc: Juergen Stuber <[email protected]>
Cc: Cesar Miquel <[email protected]>
Cc: Matthew Dharm <[email protected]>
Cc: Matthew Wilcox <[email protected]>
Cc: Sarah Sharp <[email protected]>
Cc: Kuninori Morimoto <[email protected]>
Cc: Felipe Balbi <[email protected]>
Cc: Lucas De Marchi <[email protected]>
Cc: Michael Hund <[email protected]>
Cc: Zack Parsons <[email protected]>
Cc: Melchior FRANZ <[email protected]>
Cc: Tomoki Sekiyama <[email protected]>
Cc: Dan Carpenter <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
They should not be writable by any user.
Reported-by: Linus Torvalds <[email protected]>
Cc: Harrison Metzger <[email protected]>
Cc: stable <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch fixes a bug with the usbsevseg driver which assumed that USB
autosuspend will always be used.
Signed-off-by: Harrison Metzger <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The id_table field of the struct usb_device_id is constant in <linux/usb.h>
so it is worth to make the initialization data also constant.
The semantic match that finds this kind of pattern is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@r@
disable decl_init,const_decl_init;
identifier I1, I2, x;
@@
struct I1 {
...
const struct I2 *x;
...
};
@s@
identifier r.I1, y;
identifier r.x, E;
@@
struct I1 y = {
.x = E,
};
@c@
identifier r.I2;
identifier s.E;
@@
const struct I2 E[] = ... ;
@depends on !c@
identifier r.I2;
identifier s.E;
@@
+ const
struct I2 E[] = ...;
// </smpl>
Signed-off-by: Németh Márton <[email protected]>
Cc: Julia Lawall <[email protected]>
Cc: [email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch adds to the usbsevseg driver:
- suspend/resume support
- reset_resume support
- autosuspend using the display's power state to determine idleness
Signed-off-by: Oliver Neukum <[email protected]>
Signed-off-by: Harrison Metzger <[email protected]>
|
|
Added basic support for a Delcom USB 7-segment LED Display
Signed-off by: Harrison Metzger <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|