Commit Graph
77 Commits
Author SHA1 Message Date
Thadeu Lima de Souza Cascardo 0791971ba8 usb: allow drivers to use allocated bandwidth until unbound
When using the remove sysfs file, the device configuration is set to -1
(unconfigured). This eventually unbind drivers with the bandwidth_mutex
held. Some drivers may call functions that hold said mutex, like
usb_reset_device. This is the case for rtl8187, for example. This will
lead to the same process holding the mutex twice, which deadlocks.

Besides, according to Alan Stern:
"The deadlock problem probably could be handled somehow, but there's a
separate issue: Until the usb_disable_device call finishes unbinding
the drivers, the drivers are free to continue using their allocated
bandwidth.  We musn't change the bandwidth allocations until after the
unbinding is done.  So this patch is indeed necessary."

Unbinding the driver before holding the bandwidth_mutex solves the
problem. If any operation after that fails, drivers are not bound again.
But that would be a problem anyway that the user may solve resetting the
device configuration to one that works, just like he would need to do in
most other failure cases.

Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Cc: Alan Stern <[email protected]>
Cc: Sarah Sharp <[email protected]>
Cc: stable <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-09-03 17:33:40 -07:00
Thadeu Lima de Souza Cascardo b95d13eaf3 classmate-laptop: should check for NULL as retval for rfkill_alloc
rfkill_alloc returns NULL when it fails if RFKILL is enabled. When RFKILL is
disabled, its return value of ERR_PTR(-ENODEV) is OK to use as all rfkill
functions will work with it, as they are simply empty stubs.

Reported-by: Alan Jenkins <[email protected]>
Cc: Johannes Berg <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Matthew Garrett <[email protected]>
2010-08-03 09:48:46 -04:00
Thadeu Lima de Souza Cascardo f35843ed8d classmate-laptop: depends on RFKILL or RFKILL=n
Randy Dunlap has reported that building classmate-laptop fails when
CONFIG_RFKILL=m and CONFIG_ACPI_CMPC=y. He suggested depending on
RFKILL, but, then, it will not be possible to select classmate-laptop
when RFKILL is off. There's no known problem with building and using
classmate-laptop with RFKILL off. So depend on RFKILL or RFKILL=n.

Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Matthew Garrett <[email protected]>
Reported-by: Randy Dunlap <[email protected]>
Cc: Randy Dunlap <[email protected]>
Cc: [email protected]
Cc: Daniel Oliveira Nascimento <[email protected]>
2010-08-03 09:48:44 -04:00
Thadeu Lima de Souza Cascardo b1413357d9 fbdev: fix frame buffer devices menu
Commit f601441916 ("imxfb: add support for
i.MX25:) has inserted the symbol HAVE_FB_IMX, which does not depend on FB
after the menuconfig FB.  This breaks the menu, presenting most of the
drivers outside of it, when using menuconfig.

Moving the symbol to the start of the file, just like HAVE_FB_ATMEL, fixes
the problem without breaking it for iMX25 configurations (tested with
ARCH=arm, no build).

Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Cc: Sascha Hauer <[email protected]>
Acked-by: Uwe Kleine-König <[email protected]>
Acked-by: Baruch Siach <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: Randy Dunlap <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2010-06-04 15:21:45 -07:00
Thadeu Lima de Souza Cascardo d5c051f108 classmate-laptop: Add RFKILL support.
The RFKILL device shares the same ACPI device used for backlight. So, it
required a new struct sharing both a backlight_device and a rfkill
device.

Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
2010-05-17 12:06:01 -04:00
Thadeu Lima de Souza Cascardo ca0dbd86b1 doc: inode uses a mutex instead of a semaphore.
Replace the introduced i_sem by an i_mutex in the filesystem locking
documentation. This was introduced [1] after all occurrences were
already replaced in the same text [2]. However, the term "inode
semaphore" has not been replaced then, and it's replaced now.

[1] afddba49d1
[2] a7bc02f4f4

Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Cc: Nick Piggin <[email protected]>
Cc: Artem Bityutskiy <[email protected]>
Cc: Randy Dunlap <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Al Viro <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
2010-05-10 23:42:27 +02:00
Thadeu Lima de Souza Cascardo 77554b4d1f Input: serio_raw - remove BKL
serio_raw open function already uses a mutex. Also change formatting
a bit.

Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Acked-by: Arnd Bergmann <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2010-03-09 22:05:48 -08:00
Thadeu Lima de Souza Cascardo c90c6a885a Input: mousedev - remove BKL
There's no need for BKL in mousedev, relevan protection is provided by
a private mutex.

Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Acked-by: Arnd Bergmann <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2010-03-09 22:05:09 -08:00
Thadeu Lima de Souza Cascardo 33fd797b3e eisa: fix coding style for eisa bus code
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Cc: Kay Sievers <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Alan Cox <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2010-03-06 11:26:32 -08:00
Thadeu Lima de Souza Cascardo 385f690bc0 USB: trivial: missing newline in usb core warning message
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-02 14:54:36 -08:00
Thadeu Lima de Souza Cascardo 881a6c25a8 classmate-laptop: Added some keys present in other devices
Some new devices have extra keys, which we add to our list. Currently,
they all generate events that allow us to use a simple table/array,
without need for the sparse keymap.

Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
2010-03-01 16:15:58 -05:00
Thadeu Lima de Souza Cascardo 661cb9fbf2 MAINTAINERS: Add git tree to x86 Platform Drivers
Add the x86 platform driver git tree to MAINTAINERS.

Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
2010-03-01 14:04:36 -05:00
Thadeu Lima de Souza Cascardo 02e77a55f7 classmate-laptop: use a single MODULE_DEVICE_TABLE to get correct aliases
Instead of a MODULE_DEVICE_TABLE for every acpi_driver ids table, we
create a table containing all ids to export to get a module alias for
each one.

This will fix automatic loading of the driver when one of the ACPI
devices is not present (like the accelerometer, which is not present in
some models).

Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
2010-02-25 11:50:52 -05:00
Thadeu Lima de Souza Cascardo e808bae240 x86: Do not reserve brk for DMI if it's not going to be used
This will save 64K bytes from memory when loading linux if DMI is
disabled, which is good for embedded systems.

Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by: H. Peter Anvin <[email protected]>
2010-02-25 10:28:18 +01:00
Thadeu Lima de Souza Cascardo a8ab0102d7 doc: fix console doc typo
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
2010-02-24 13:51:32 +01:00
Thadeu Lima de Souza Cascardo 0e956c132f nl80211: does not allow NEW_STATION and DEL_STATION for mesh
As discussed in linux-wireless mailing list, adding and removing
stations for mesh topologies is not necessary. Since doing it triggers
bugs, the sugestion was to simply disable it.

Tested using a custom iw command "station new". Works only after using
hostapd. "station del" command also works.

Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Cc: Johannes Berg <[email protected]>
Cc: Simon Raffeiner <[email protected]>
Cc: Andrey Yurovsky <[email protected]>
Cc: Javier Cardona <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
2010-02-15 16:12:52 -05:00
Thadeu Lima de Souza Cascardo a64061e100 doc: capitalization and other minor fixes in pnp doc
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
2010-02-05 12:22:44 +01:00
Thadeu Lima de Souza Cascardo 3333e9ee9f doc: fix Defaultd -> Defaults typo in EISA doc
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
2010-02-05 12:22:39 +01:00
Thadeu Lima de Souza Cascardo 19afd8e2ff doc: update 00-INDEX for Documentation/laptops/
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
2010-02-05 12:22:38 +01:00
Thadeu Lima de Souza Cascardo 2273130de8 fix comment typo leve -> level in powerpc
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
2010-02-05 12:22:38 +01:00
Thadeu Lima de Souza Cascardo de8164fb22 doc: fix leve -> level typo in pm-runtime doc
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
2010-02-05 12:22:37 +01:00
Thadeu Lima de Souza Cascardo af66585270 fix comment typo boo -> boot in ksysfs.c
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
2010-02-05 12:22:37 +01:00
Thadeu Lima de Souza Cascardo d6b198bc8a fix ext3/ext4 comment typo compain -> complain
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
2010-02-05 12:22:36 +01:00
Thadeu Lima de Souza Cascardo c2c3489c5b HID: use multi input quirk for TouchPack touchscreen
This device generates ABS_Z and ABS_RX events, while it should be
generating ABS_X and ABS_Y instead. Using the MULTI_INPUT quirk solves
this issue.

Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Daniel Oliveira Nascimento <[email protected]>
[[email protected]: fixed blacklist ordering while resolving conflict]
[[email protected]: fixed typo to make it compile]
Signed-off-by: Jiri Kosina <[email protected]>
2010-02-04 18:50:23 +01:00
Thadeu Lima de Souza Cascardo ae06b8330a can: ems_usb: removed duplicated code setting local echo support
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
2010-02-04 09:21:28 -08:00
Thadeu Lima de Souza Cascardo 59b26c7291 trivial: remove duplicated "from" in CAN USB EMS Kconfig help
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
2010-02-03 20:32:18 -08:00
Thadeu Lima de Souza Cascardo 3fdde0a160 irda: add missing BKL in irnet_ppp ioctl
One ioctl has been forgotten when the BKL was push down into irnet_ppp
ioctl function.

Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
2010-02-03 20:14:23 -08:00
Thadeu Lima de Souza Cascardo 454debe45c irda: unbalanced lock_kernel in irnet_ppp
Add the missing unlock_kernel in one ioctl operation.

Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
2010-02-03 20:14:22 -08:00
Thadeu Lima de Souza Cascardo 6c504d4231 powerpc: Fix typo s/leve/level/ in TLB code
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Benjamin Herrenschmidt <[email protected]>
2010-02-03 17:39:50 +11:00
Thadeu Lima de Souza Cascardo ca0bf64d99 pktcdvd: removing device does not remove its sysfs dir
This is the counterpart to cba767175b
("pktcdvd: remove broken dev_t export of class devices").  Device is not
registered using dev_t, so it should not be destroyed using device_destroy
which looks up the device by dev_t.  This will fail and adding the device
again will fail with the "duplicate name" error.  This is fixed using
device_unregister instead of device_destroy.

Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Cc: Kay Sievers <[email protected]>
Cc: Peter Osterlund <[email protected]>
Cc: Al Viro <[email protected]>
Cc: Jens Axboe <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2010-02-02 18:11:23 -08:00
Thadeu Lima de Souza Cascardo 8127f4e883 HID: use multi input quirk for eTurboTouch touchscreen
This device generates ABS_Z and ABS_RX events, while it should be
generating ABS_X and ABS_Y instead. Using the MULTI_INPUT quirk solves
this issue.

Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Daniel Oliveira Nascimento <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
2010-02-02 23:05:38 +01:00
Thadeu Lima de Souza Cascardo c85a400499 ALSA: trivial: sound seq ioctl dbg: print hexadecimal value padded with 0s
Instead of padding with blanks and printing "number=0x a", print
"number=0x0a".

Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
2010-02-02 00:27:47 +01:00
Thadeu Lima de Souza Cascardo 45cdba4d37 Input: uinput - remove BKL from uinput_open function
Commit 8702965848 pushed down the BKL
into uinput open function. However, there's nothing that needs locking
in there.

Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2010-01-29 23:55:18 -08:00
Thadeu Lima de Souza Cascardo 00097c4fdf x86, trivial: Fix grammo in tsc comment about Geode TSC reliability
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
LKML-Reference: <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
2010-01-18 09:01:39 +01:00
Thadeu Lima de Souza Cascardo c556752109 i2c: Do not use device name after device_unregister
dev_dbg outputs dev_name, which is released with device_unregister. This bug
resulted in output like this:

i2c Xy2�0: adapter [SMBus I801 adapter at 1880] unregistered

The right output would be:
i2c i2c-0: adapter [SMBus I801 adapter at 1880] unregistered

Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
2010-01-16 20:43:13 +01:00
Thadeu Lima de Souza Cascardo c181a13a41 ALSA: use subsys_initcall for sound core instead of module_init
This is needed for built-in drivers which are built before the sound directory,
like thinkpad_acpi.

Otherwise, registering a card fails.

Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
2010-01-14 21:21:47 +01:00
Thadeu Lima de Souza Cascardo 529aa8cb0a classmate-laptop: add support for Classmate PC ACPI devices
This add supports for devices like keyboard, backlight, tablet and
accelerometer.

This work is supported by International Syst S/A.

[[email protected]: cmpc_acpi: depends on ACPI]
[[email protected]: readability tweaks]
[[email protected]: coding-style fixes]
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Len Brown <[email protected]>
2009-12-24 01:16:04 -05:00
Thadeu Lima de Souza Cascardo 8ae1c92480 spidev: use DECLARE_BITMAP instead of declaring the array
[[email protected]: coding-style fixes]
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Cc: David Brownell <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Grant Likely <[email protected]>
2009-12-17 08:39:12 -07:00
Thadeu Lima de Souza Cascardo 1f2f38d89d drivers/char/misc.c: use bitmap/bitops functions for dynamic minor number allocation
Use DECLARE_BITMAP(), find_first_zero_bit(), set_bit() and clear_bit()
instead of rewriting code to do it with the minor number dynamic
allocation bitmap.

We need to invert the bit position to keep the code behaviour of using the
last minor numbers first, since we don't have a find_last_zero_bit.

Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Alan Cox <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2009-12-15 08:53:27 -08:00
Thadeu Lima de Souza Cascardo 4ae717da8d drivers/char/misc.c: clear allocation bit in minor bitmap when device register fails
If there's a failure creating the device (because there's already one with
the same name, for example), the current implementation does not clear the
bit for the allocated minor and that number is lost for future
allocations.

Second, the test currently in misc_deregister is broken, since it does not
test for the 0 minor.

Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Alan Cox <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2009-12-15 08:53:27 -08:00
Thadeu Lima de Souza Cascardo 2643434c1a misc: remove MAC pmu function declaration from misc device class
Commit 8c8709334c has removed the
pmu_device_init call from misc_init, but unlike other similar commits,
has not removed its declaration.

Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2009-12-15 08:53:26 -08:00
Thadeu Lima de Souza Cascardo 1c8a375185 ide: doc: remove compilation options section from ide-cd documentation
This section pointed out to compilation options which no longer exist.

VERBOSE_IDE_CD_ERRORS has been replace by config option
CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS.

STANDARD_ATAPI is no longer needed, since the non-standard drivers, which
required bcd2bin are now detected, and there's a flag for them.

NO_DOOR_LOCKING is now a sysctl parameter for cdrom drivers.

CDROM_NBLOCKS_BUFFER is not used anymore. The READAUDIO is now in cdrom.c and it
allocates as much as user space has requested to read, backing off if it fails.

TEST is not there anymore or in cdrom either. ide allows to send ATA commands
through ioctl, although it may be helpful to send MMC packets through the cdrom
layer directly.

Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
2009-12-13 20:41:53 -08:00
Thadeu Lima de Souza Cascardo 9f249162fb trivial: some small fixes in exofs documentation
Add exofs.txt to filesystems Documentation index and fix some typos,
identation and grammar.

Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Boaz Harrosh <[email protected]>
2009-12-10 09:59:16 +02:00
Thadeu Lima de Souza Cascardo 8a74770353 sysctl: add missing comments
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
2009-12-04 15:39:53 +01:00
Thadeu Lima de Souza Cascardo 137f1188ef spidev: fix double "of of" in comment
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
2009-12-04 15:39:50 +01:00
Thadeu Lima de Souza Cascardo 1e04b7ae70 sdio_uart: coding style fixes
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
2009-12-04 15:39:48 +01:00
Thadeu Lima de Souza Cascardo 94e2bd6888 tree-wide: fix some typos and punctuation in comments
fix some typos and punctuation in comments

Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
2009-12-04 15:39:48 +01:00
Thadeu Lima de Souza Cascardo 235faf9b41 rt2800lib: fix some typos and punctuation in comments
fix some typos and punctuation in comments

Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
[bart: ported the change from the older patch for rt2800usb & rt61pci]
Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
2009-11-13 17:44:00 -05:00
Thadeu Lima de Souza Cascardo b34e620faa rt2x00: fix some typos and punctuation in comments
fix some typos and punctuation in comments

Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
2009-11-11 17:09:18 -05:00
Thadeu Lima de Souza Cascardo 8d6cfdcdb5 PCI: remove pci_find_slot from PCI_LEGACY config description
Commit 3b073eda has removed pci_find_slot, so there's no point in
mentioning it in the config description as one of the deprecated APIs
there are enabled by PCI_LEGACY and still used by some drivers.

Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Jesse Barnes <[email protected]>
2009-11-04 13:06:42 -08:00
Thadeu Lima de Souza Cascardo dd77038d23 perf_events: Fix some typo in the perf events config description
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Cc: [email protected]
LKML-Reference: <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
2009-11-02 16:53:35 +01:00
Thadeu Lima de Souza Cascardo 36726dd922 trivial: fix typo s/ketymap/keymap/ in comment
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
2009-09-21 15:14:55 +02:00
Thadeu Lima de Souza Cascardo e681c9dd62 PM: Fix typo in label name s/Platofrm_finish/Platform_finish/
Although the same label name is used somewhere else in the file, this
particular label was consistently typoed in all of its uses.

Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
2009-09-14 20:26:58 +02:00
Thadeu Lima de Souza Cascardo 74cbe20294 leds: fix coding style in worker thread code for ledtrig-gpio.
[[email protected]: coding-style fixes]
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Samuel R. C. Vale <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Richard Purdie <[email protected]>
2009-09-07 14:33:33 +01:00
Thadeu Lima de Souza Cascardo cc674c81f0 leds: after setting inverted attribute, we must update the LED
If we change the inverted attribute to another value, the LED will not be
inverted until we change the GPIO state.

Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Cc: Samuel R. C. Vale <[email protected]>
Cc: Richard Purdie <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2009-08-26 20:06:53 -07:00
Thadeu Lima de Souza Cascardo 48cccd26f3 leds: fix multiple requests and releases of IRQ for GPIO LED Trigger
When setting the same GPIO number, multiple IRQ shared requests will be
done without freing the previous request.  It will also try to free a
failed request or an already freed IRQ if 0 was written to the gpio file.

All these oops and leaks were fixed with the following solution: keep the
previous allocated GPIO (if any) still allocated in case the new request
fails.  The alternative solution would desallocate the previous allocated
GPIO and set gpio as 0.

Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Samuel R. C. Vale <[email protected]>
Cc: Richard Purdie <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2009-08-26 20:06:53 -07:00
Thadeu Lima de Souza Cascardo 1fe90b033e trivial: remove duplicate "different" from comment
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
2009-08-14 09:14:02 -04:00
Thadeu Lima de Souza Cascardo 659098141d rtc: mark if rtc-cmos drivers were successfully registered
rtc-cmos has two drivers, one PNP and one platform.  When PNP has not
succeeded probing, platform is registered.  However, it tries to
unregister both drivers unconditionally, instead of only unregistering
those that were successfully registered.  This causes runtime warnings to
be emitted from the driver core code.

Fix this with a boolean variable for each driver indicating whether
registering was successful.

Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Cc: David Brownell <[email protected]>
Cc: Bjorn Helgaas <[email protected]>
Cc: Alessandro Zummo <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: David Brownell <[email protected]>
Cc: Kay Sievers <[email protected]>
Cc: Greg KH <[email protected]>
Cc: Ozan Caglayan <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2009-07-29 19:10:35 -07:00
Thadeu Lima de Souza Cascardo 987b881666 trivial: fix typo in ieee802154 documentation and add it to index
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
2009-07-27 17:41:59 +04:00
Thadeu Lima de Souza Cascardo ddaa43433d Input: mark serio and i8042 as suspended when hibernating too
Serio ports are not being restarted any longer because resume operations
after hibernate do nothing, since the device has not been marked as
suspended. This happens because suspend is only considering the SUSPEND
event but not the FREEZE event.

Note that this driver has still to migrate to dev_pm_ops, but this fixes
this particular bug now.

Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2009-07-07 22:46:58 -07:00
Thadeu Lima de Souza Cascardo f4fa446883 usb_serial: Fix oops when unexisting usb serial device is opened.
This commit 335f8514f2 has stopped
properly checking if there is any usb serial associated with the tty in
the close function. It happens the close function is called by releasing
the terminal right after opening the device fails.

As an example, open fails with a non-existing device, when probe has
never been called, because the device has never been plugged. This is
common in systems with static modules and no udev.

Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2009-06-25 11:24:26 -07:00
Thadeu Lima de Souza Cascardo 922b13565b acm: Fix oops when closing ACM tty device right after open has failed.
This commit 10077d4a66 has stopped
checking if there was a valid acm device associated to the tty, which is
not true right after open fails and tty subsystem tries to close the
device.

As an example, open fails with a non-existing device, when probe has
never been called, because the device has never been plugged. This is
common in systems with static modules and no udev.

Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2009-06-25 11:24:26 -07:00
Thadeu Lima de Souza Cascardo 42dd2aa649 acm: Return ENODEV instead of EINVAL when trying to open ACM device.
This is required, otherwise a user will get a EINVAL while opening a
non-existing device, instead of ENODEV.

This is what I get with this patch applied now instead of an "Invalid
argument".

  cascardo@vespa:~$ cat /dev/ttyACM0
  cat: /dev/ttyACM0: No such device
  cascardo@vespa:~$

Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2009-06-25 11:24:26 -07:00
Thadeu Lima de Souza Cascardo ae27a7ab2c mtd: atmel_nand: Fix typo s/parititions/partitions/
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
2009-06-25 08:18:36 +01:00
Thadeu Lima de Souza Cascardo 342ba1039a mtd: cmdlineparts: Use 64-bit format when printing a debug message.
Commit 69423d99fc ("[MTD] update internal 
API to support 64-bit device size") has changed some structure values
to 64-bit and has not updated this debug message, since it's not built 
by default.

Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
2009-06-25 08:18:12 +01:00
Thadeu Lima de Souza Cascardo ab2274af05 trivial: fix typo compatiable/compatiability has extra 'a'.
Signed-off-by: Jiri Kosina <[email protected]>
2009-06-12 18:01:46 +02:00
Thadeu Lima de Souza Cascardo 7ea2ac9b66 Trivial: fix typo s/balence/balance/
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
2009-06-12 18:01:45 +02:00
Thadeu Lima de Souza Cascardo 4b512d26f4 trivial: typo (en|dis|avail|remove)bale -> (en|dis|avail|remove)able
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
2009-06-12 18:01:45 +02:00
Thadeu Lima de Souza Cascardo 3d5cb60ef3 Input: simplify name handling for certain input handles
For evdev, joydev and mousedev, instead of having a separate character array
holding name of the handle, use struct devce's name which is the same.

Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2009-05-11 00:11:43 -07:00
Thadeu Lima de Souza Cascardo ac7c992cac e100: do not go D3 in shutdown unless system is powering off
After experimenting with kexec with the last merges after 2.6.29, I've
had some problems when probing e100.  It would not read the eeprom.  After
some bisects, I realized this has been like that since forever (at least
2.6.18).  The problem is that shutdown is doing the same thing that
suspend does and puts the device in D3 state.  I couldn't find a way to
get the device back to a sane state in the probe function.  So, based on
some similar patches from Rafael J. Wysocki for e1000, e1000e, and ixgbe,
I wrote this one for e100.

Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Acked-by: "Rafael J. Wysocki" <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
2009-04-28 22:42:39 -07:00
Thadeu Lima de Souza Cascardo 4a74491ef5 Input: fix typo in documentation
Event type for key presses is EV_KEY, not REL_KEY.

Signed-off-by: Dmitry Torokhov <[email protected]>
2009-04-17 20:40:52 -07:00
Thadeu Lima de Souza Cascardo 21acb9caa2 trivial: fix where cgroup documentation is not correctly referred to
cgroup documentation was moved to Documentation/cgroups/. There are some
places that still refer to Documentation/controllers/,
Documentation/cgroups.txt and Documentation/cpusets.txt. Fix those.

Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Reviewed-by: Li Zefan <[email protected]>
Acked-by: Paul Menage <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
2009-03-30 15:22:02 +02:00
Thadeu Lima de Souza Cascardo 6d5e147dd0 trivial: Give the right path in Documentation example
While the Documentation example creates /cgroup/test, it removes
/test/cgroup, which is clearly not the intended path. Change that to
/cgroup/test.

Acked-by: KAMEZAWA Hiroyuki <[email protected]>
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
2009-03-30 15:22:02 +02:00
Thadeu Lima de Souza Cascardo b833b5ec04 ALSA: AC97: Fix function name type in comment s/updat/update/
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
2009-01-29 08:38:56 +01:00
Thadeu Lima de Souza Cascardo 328cc6dfaa ALSA: AC97: Print AC97 flags in proc file to make debug it easier
While debugging some code paths in AC97 codec patches and its suspend
and resume functions, getting to know the flags has proved useful to
follow those code paths.

Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
2009-01-29 08:38:36 +01:00
Thadeu Lima de Souza Cascardo e3e9c5e709 ALSA: Don't cold reset AC97 codecs in some ICH chipsets
Check in a quirk list if it should do cold reset when AC97 power saving
is enabled. Some devices do not resume properly when cold reset,
although power saving works OK.

Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
2009-01-28 15:56:32 +01:00
Thadeu Lima de Souza Cascardo 9fd9784c91 ext4: Fix building with EXT4FS_DEBUG
When bg_free_blocks_count was renamed to bg_free_blocks_count_lo in
560671a0, its uses under EXT4FS_DEBUG were not changed to the helper
ext4_free_blks_count.

Another commit, 498e5f24, also did not change everything needed under
EXT4FS_DEBUG, thus making it spill some warnings related to printing
format.

This commit fixes both issues and makes ext4 build again when
EXT4FS_DEBUG is enabled.

Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: "Theodore Ts'o" <[email protected]>
2009-01-26 19:26:26 -05:00