In the near future, the driver core is going to not allow direct access
to the driver_data pointer in struct device. Instead, the functions
dev_get_drvdata() and dev_set_drvdata() should be used. These functions
have been around since the beginning, so are backwards compatible with
all older kernel versions.
Cc: Leon Woestenberg <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
`!' has a higher precedence than `&' and `|' has a higher precedence than `?'
Signed-off-by: Roel Kluin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
wmm_param[1].ac_aci_acm_aifsn was tested twice, the second should have been
wmm_param[3].ac_aci_acm_aifsn.
Signed-off-by: Roel Kluin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The use of sprintf() to append to a buffer, as in
sprintf(buf, "%sEntry: %d\n", buf, i)
is not valid according to C99 ("If copying takes place between objects
that overlap, the behavior is undefined."). It breaks at least in
userspace under gcc -D_FORTIFY_SOURCE. Replace this construct with
sprintf(buf + strlen(buf), "Entry: %d\n", i)
This patch was automatically generated using
perl -0pe 's/(sprintf\s*\(\s*([^,]*))(\s*,\s*")%s((?:[^"\\]|\\.)*"\s*,)\s*\2\s*,/$1 + strlen($2)$3$4/g'
perl -0pe 's/(snprintf\s*\(\s*([^,]*))(\s*,[^,]*?)(\s*,\s*")%s((?:[^"\\]|\\.)*"\s*,)\s*\2\s*,/$1 + strlen($2)$3 - strlen($2)$4$5/g'
Signed-off-by: Anders Kaseorg <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The use of sprintf() to append to a buffer, as in
sprintf(buf, "%sEntry: %d\n", buf, i)
is not valid according to C99 ("If copying takes place between objects
that overlap, the behavior is undefined."). It breaks at least in
userspace under gcc -D_FORTIFY_SOURCE. Replace this construct with
sprintf(buf + strlen(buf), "Entry: %d\n", i)
This patch was automatically generated using
perl -0pe 's/(sprintf\s*\(\s*([^,]*))(\s*,\s*")%s((?:[^"\\]|\\.)*"\s*,)\s*\2\s*,/$1 + strlen($2)$3$4/g'
perl -0pe 's/(snprintf\s*\(\s*([^,]*))(\s*,[^,]*?)(\s*,\s*")%s((?:[^"\\]|\\.)*"\s*,)\s*\2\s*,/$1 + strlen($2)$3 - strlen($2)$4$5/g'
Signed-off-by: Anders Kaseorg <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The remove function uses __devexit, so the .remove assignment needs
__devexit_p() to fix a build error with hotplug disabled.
Signed-off-by: Jean Delvare <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Remove pci and usb tables from the header and place them directly in
the code.
While at it, use PCI_VDEVICE() to shorten the code.
Signed-off-by: Jiri Slaby <[email protected]>
Cc: David Kiliani <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
There is no need to occupy one major number because of one device.
Switch to misc device, which also emits uevent, so that the dev node
is also created by udev.
Signed-off-by: Jiri Slaby <[email protected]>
Cc: David Kiliani <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
conf->bssid is const. Propagate const to not get compiler warnings:
agnx/pci.c: In function ‘agnx_config_interface’:
agnx/pci.c:319: warning: passing argument 2 of ‘agnx_set_bssid’ discards qualifiers from pointer target type
agnx/pci.c:321: warning: passing argument 2 of ‘hash_write’ discards qualifiers from pointer target type
Signed-off-by: Jiri Slaby <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Pass 0 to pci_iomap instead. It will cope with that per se.
Signed-off-by: Jiri Slaby <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
- switch printks to dev_*
- remove useless comments
- remove useless prints (for info we can obtain from lspci or /sys)
Signed-off-by: Jiri Slaby <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
comedi driver(s) use udelay() so they need to #include delay.h.
drivers/staging/comedi/drivers/adq12b.c: In function 'adq12b_ai_rinsn':
drivers/staging/comedi/drivers/adq12b.c:328: error: implicit declaration of function 'udelay'
Signed-off-by: Randy Dunlap <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
These changes guarantee that the URBs are not resubmitted in case of a
comedi buffer overflow. Otherwise this runs in the background even when
the userspace program has terminated.
From: Bernd Porr <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Many of the comedi source code has functions that were created with
cut and paste, this moves the do_cmdtest function into a single file.
Signed-off-by: Bill Pemberton <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Remove the MIN() macro and instead use the min() provided by kernel.h
Signed-off-by: Bill Pemberton <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Fix this build error:
.../comedi_test.c:82: error: field timer has incomplete type
.../comedi_test.c: In function waveform_ai_interrupt:
.../comedi_test.c:188: error: implicit declaration of function mod_timer
.../comedi_test.c:188: error: jiffies undeclared (first use in this function)
Signed-off-by: Alexander Beregalov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
There are several read and write functions in adl_pci8164 that are
essentially the same thing. They were created with a cut and paste.
Change them to use a common function.
Signed-off-by: Bill Pemberton <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Replace 2 attempts to use a for loop as a sleep with a call to msleep().
Signed-off-by: Bill Pemberton <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This removes the unused RT code from the comedi subsystem.
A lot of drivers needed to then include interrupt.h on their own, as they
were picking it up through the comedi_rt.h inclusion.
Cc: Ian Abbott <[email protected]>
Cc: Frank Mori Hess <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
There are a number of comedi "wrappers" for some RT functions that are
about to go away. This patch removes all of the wrapper calls within
the comedi drivers and core in order to prepare for removing the RT
comedi code.
Cc: Ian Abbott <[email protected]>
Cc: Frank Mori Hess <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The firmware is now in the linux-firmware tree, so we can move these two
drivers to use the proper request_firmware infrastructure.
From: Bernd Porr <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This if test doesn't do anything, so comment it out.
Signed-off-by: Bill Pemberton <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Replace instances of computing number of elements in an array with
sizeof(foo)/sizeof(struct footype) with the ARRAY_SIZE macro.
Signed-off-by: Bill Pemberton <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Change from the foo: bar format to the .foo = bar format.
Signed-off-by: Bill Pemberton <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Change calses of & foo to &foo as suggested by checkpatch.
Signed-off-by: Bill Pemberton <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Change from the foo: bar format to the .foo = bar format.
Signed-off-by: Bill Pemberton <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>