dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

31 Commits

Author SHA1 Message Date
Jonathan Brett 0e4da5cbae Staging: asus_oled: Add suspend/resume callbacks
- Add simple suspend/resume PM callbacks to disable oled display on
  suspend and return to previous state on resume

Signed-off-by: Jonathan Brett <jonbrett.dev@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 13:12:13 -07:00
Jonathan Brett bef41c3cd3 staging: asus_oled add MODULE_VERSION
Moved version string from MODULE_DESCRIPTION to MODULE_VERSION

Signed-off-by: Jonathan Brett <jonbrett.dev@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-15 15:31:26 -07:00
Jonathan Brett 9c8adb8ff5 staging: asus_oled: Change printk calls to dev_xxx
- Use dev_err whenever a struct device * is present
- None of the printk calls had levels set, but looked like they should
  probably be dev_err

Signed-off-by: Jonathan Brett <jonbrett.dev@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-15 15:31:26 -07:00
Cruz Julian Bishop 485b34c2df staging: Fixes some checkpatch warnings in asus_oled/asus_oled.c
This fixes the following warnings:

	1: Changes a printk(KERN_ERR) call to a pr_err call in line 785
	2: Changes a printk(KERN_ERR) call to a pr_err call in line 791
	3: Changes a printk(KERN_ERR) call to a pr_err call in line 798
	4: Reduces line length below 80 at line 785 (Not intended)
	5: Reduces line length below 80 at line 798 (Not intended)

Signed-off-by: Cruz Julian Bishop <cruz@massive-dynamics.biz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-09 12:32:53 -07:00
Greg Kroah-Hartman fc433dea4d USB: asus_oled.c: remove err() usage
err() was a very old USB-specific macro that I thought had
gone away.  This patch removes it from being used in the
driver and uses dev_err() instead.

CC: Jakub Schmidtke <sjakub@gmail.com>
CC: Pekka Paalanen <pq@iki.fi>
CC: Peter Huewe <peterhuewe@gmx.de>
CC: "Ken O'Brien" <kernel@kenobrien.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-20 16:53:17 -07:00
Lucas De Marchi 970e248649 Documentation: remove references to /etc/modprobe.conf
Usage of /etc/modprobe.conf file was deprecated by module-init-tools and
is no longer parsed by new kmod tool. References to this file are
replaced in Documentation, comments and Kconfig according to the
context.

There are also some references to the old /etc/modules.conf from 2.4
kernels that are being removed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
Acked-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-03-30 16:03:15 -07:00
Peter Huewe 480491889f staging: asus_oled: Remove superfluous loop
This patch removes a superfluous loop in asus_oled.c
The code is equivalent to do{...} while (0) and thus executes the code
exactly once -> so we can simply remove the loop.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-29 15:43:21 -08:00
Pekka Paalanen 3589e74595 Staging: asus_oled: fix NULL-ptr crash on unloading
Asus_oled triggers the following bug on module unloading:

 usbcore: deregistering interface driver asus-oled
 BUG: unable to handle kernel NULL pointer dereference at 0000000000000038
 IP: [<ffffffff8111292b>] sysfs_delete_link+0x30/0x66

 Call Trace:
  [<ffffffff81225373>] device_remove_class_symlinks+0x6b/0x70
  [<ffffffff812256a8>] device_del+0x9f/0x1ab
  [<ffffffff812257c5>] device_unregister+0x11/0x1e
  [<ffffffffa000cb82>] asus_oled_disconnect+0x4f/0x9e [asus_oled]
  [<ffffffff81277430>] usb_unbind_interface+0x54/0x103
  [<ffffffff812276c4>] __device_release_driver+0xa2/0xeb
  [<ffffffff81227794>] driver_detach+0x87/0xad
  [<ffffffff812269e9>] bus_remove_driver+0x91/0xc1
  [<ffffffff81227fb4>] driver_unregister+0x66/0x6e
  [<ffffffff812771ed>] usb_deregister+0xbb/0xc4
  [<ffffffffa000ce87>] asus_oled_exit+0x2f/0x31 [asus_oled]
  [<ffffffff81068365>] sys_delete_module+0x1b8/0x21b
  [<ffffffff810ae3de>] ? do_munmap+0x2ef/0x313
  [<ffffffff813699bb>] system_call_fastpath+0x16/0x1b

This is due to an incorrect destruction sequence in asus_oled_exit().

Fix the order, fixes the bug. Tested on an Asus G50V laptop only.

Cc: Jakub Schmidtke <sjakub@gmail.com>
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-02-08 14:14:13 -08:00
Pekka Paalanen 635032cb39 Staging: asus_oled: fix image processing
Programming an image was broken, because odev->buf_offs was not advanced
for val == 0 in append_values(). This regression was introduced in:

 commit 1ff12a4aa3
 Author: Kevin A. Granade <kevin.granade@gmail.com>
 Date:   Sat Sep 5 01:03:39 2009 -0500

     Staging: asus_oled: Cleaned up checkpatch issues.

Fix the image processing by special-casing val == 0.

I have tested this change on an Asus G50V laptop only.

Cc: Jakub Schmidtke <sjakub@gmail.com>
Cc: Kevin A. Granade <kevin.granade@gmail.com>
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-02-08 14:14:13 -08:00
Ken O'Brien 67d6baa401 Staging: asus_oled: Fixed use of obsolete function.
Removed use of obsolete function "strict_strtoul". Replaced with "kstrtoul"
as suggested by checkpatch.pl

Signed-off-by: Ken O'Brien <kernel@kenobrien.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:13:54 -08:00
Greg Kroah-Hartman ea3398a1ae Staging: Merge 2.6.37-rc5 into staging-next
This was done to handle a number of conflicts in the batman-adv
and winbond drivers properly.  It also now allows us to fix up the sysfs
attributes properly that were not in the .37 release due to them being
only in this tree at the time.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-12-07 10:47:56 -08:00
Greg Kroah-Hartman 515b4987cc Staging: asus_oled: fix up my fixup for some sysfs attribute permissions
They should be writable by root, not readable.
Doh, stupid me with the wrong flags.

Reported-by: Jonathan Cameron <jic23@cam.ac.uk>
Cc: Jakub Schmidtke <sjakub@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-18 11:27:18 -08:00
Greg Kroah-Hartman 590b0b9754 Staging: asus_oled: fix up some sysfs attribute permissions
They should not be writable by any user

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Jakub Schmidtke <sjakub@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-16 11:17:01 -08:00
Johan Meiring 9f027eb687 Staging: asus_oled: fix coding style issue in asus_oled.c
This is a patch to the asus_oled.c file that fixes up brace and enum
warning found by the checkpatch.pl tool

Signed-off-by: Johan Meiring <johanmeiring@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 16:37:17 -08:00
Justin P. Mattock 631dd1a885 Update broken web addresses in the kernel.
The patch below updates broken web addresses in the kernel

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Cc: Maciej W. Rozycki <macro@linux-mips.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Finn Thain <fthain@telegraphics.com.au>
Cc: Randy Dunlap <rdunlap@xenotime.net>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Dimitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Mike Frysinger <vapier.adi@gmail.com>
Acked-by: Ben Pfaff <blp@cs.stanford.edu>
Acked-by: Hans J. Koch <hjk@linutronix.de>
Reviewed-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-10-18 11:03:14 +02:00
Andrea Gelmini e67fdbc3ed Staging: asus_oled: asus_oled.c: Checkpatch cleanup
drivers/staging/asus_oled/asus_oled.c:774: ERROR: code indent should use tabs where possible

Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11 11:35:30 -07:00
Andi Kleen 0933e2d98d driver core: Convert some drivers to CLASS_ATTR_STRING
Convert some drivers who export a single string as class attribute
to the new class_attr_string functions. This removes redundant
code all over.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-07 17:04:48 -08:00
Andi Kleen 28812fe11a driver-core: Add attribute argument to class_attribute show/store
Passing the attribute to the low level IO functions allows all kinds
of cleanups, by sharing low level IO code without requiring
an own function for every piece of data.

Also drivers can extend the attributes with own data fields
and use that in the low level function.

This makes the class attributes the same as sysdev_class attributes
and plain attributes.

This will allow further cleanups in drivers.

Full tree sweep converting all users.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-07 17:04:48 -08:00
Németh Márton a457732b83 staging: make USB device id constant
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 <nm127@freemail.hu>
Cc: Julia Lawall <julia@diku.dk>
Cc: cocci@diku.dk
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:42 -08:00
Peter Huewe 0df28be06e Staging: asus_oled: Add NULL test for kmalloc
This patch adds a NULL test to check wether kmalloc was successful or
not.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:40 -08:00
Peter Huewe e89230ec91 Staging: asus_oled: Add defines for asus vendor_id and device_id to be consistent with hid-ids.h
This almost trivial patch replaces the hardcoded values for the vendor and
device ids with defines, as they are used in drivers/hid/hid-ids.h

For me this seems to be more consistent, however as drivers/hid/hid-ids.h
is not within the default include directory I had to redefine the defines here
(maybe move the hid-ids.h to include/linux ?)

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:29 -08:00
Eugeni Dodonov 20633bf014 Staging: asus_oled: fix oops in 2.6.32.2
After updating to 2.6.32 kernel, I started experiencing Oopses caused by
the asus_oled module. After quick investigation, I wrapped this simple
patch which fixes an Oops in by asus_oled module on 2.6.32.2 kernel,
caused by incorrect usage of strict_strtoul function call within
set_enabled and set_disabled functions. This can be triggered by simple
running the userspace client for asus_old (e.g., 'asusoled -e' or
'asusoled -d').

Signed-off-by: Eugeni Dodonov <eugeni@mandriva.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-01-20 15:05:25 -08:00
Kevin A. Granade 1ff12a4aa3 Staging: asus_oled: Cleaned up checkpatch issues.
Signed-off-by: Kevin A. Granade <kevin.granade@gmail.com>
Cc: Belisko Marek <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:02:33 -07:00
Greg Kroah-Hartman 0d99b6eb85 Staging: asus_oled: fix build warnings
This fixes some build warnings in the asus_oled driver.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:55 -07:00
Andre Haupt 94aa5b44cc Staging: asus_oled: do not use assignment in if condition
This fixes some errors reported by checkpatch.pl

Signed-off-by: Andre Haupt <andre@bitwigglers.org>
Cc: Jakub Schmidtke <sjakub@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:15 -07:00
Andre Haupt 118015c4d4 Staging: asus_oled: fix various checkpatch.pl issues regarding missing or obsolete spaces
Signed-off-by: Andre Haupt <andre@bitwigglers.org>
Cc: Jakub Schmidtke <sjakub@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:15 -07:00
Andre Haupt 526fd20a35 Staging: asus_oled: trailing statements should be on next line
fix the following error reported by checkpatch.pl
ERROR: trailing statements should be on next line

Signed-off-by: Andre Haupt <andre@bitwigglers.org>
Cc: Jakub Schmidtke <sjakub@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:15 -07:00
Andre Haupt b0e5ca810a Staging: asus_oled: do not initialise statics to 0 or NULL
fix the following error reported by checkpatch.pl
ERROR: do not initialise statics to 0 or NULL

Signed-off-by: Andre Haupt <andre@bitwigglers.org>
Cc: Jakub Schmidtke <sjakub@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:15 -07:00
Andre Haupt ccdb24592f Staging: asus_oled: fix sparse warnings about using plain integer as NULL pointer
Signed-off-by: Andre Haupt <andre@bitwigglers.org>
Cc: Jakub Schmidtke <sjakub@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:15 -07:00
Kamalesh Babulal 5ec5ec7806 Staging: asus_oled: fix build dependancy
asus_oled depends on the CONFIG_USB_SUPPORT, I have only build tested
the patch.

Signed-off-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:28 -08:00
Jakub Schmidtke fb53440b18 Staging: add asus_oled driver
Driver for the OLED tiny display on some Asus laptops.

From: Jakub Schmidtke <sjakub@gmail.com>
Cc: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:28 -08:00