mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
[PATCH] mutex subsystem, semaphore to completion: IDE ->gendev_rel_sem
The patch changes semaphores that are initialized as locked to complete(). Source: MontaVista Software, Inc. Modified-by: Steven Rostedt <rostedt@goodmis.org> The following patch is from Montavista. I modified it slightly. Semaphores are currently being used where it makes more sense for completions. This patch corrects that. Signed-off-by: Aleksey Makarov <amakarov@ru.mvista.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
3fe0c27761
commit
f36d4024ca
3 changed files with 9 additions and 8 deletions
|
@ -18,6 +18,7 @@
|
|||
#include <linux/bio.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/pci.h>
|
||||
#include <linux/completion.h>
|
||||
#include <asm/byteorder.h>
|
||||
#include <asm/system.h>
|
||||
#include <asm/io.h>
|
||||
|
@ -638,7 +639,7 @@ typedef struct ide_drive_s {
|
|||
int crc_count; /* crc counter to reduce drive speed */
|
||||
struct list_head list;
|
||||
struct device gendev;
|
||||
struct semaphore gendev_rel_sem; /* to deal with device release() */
|
||||
struct completion gendev_rel_comp; /* to deal with device release() */
|
||||
} ide_drive_t;
|
||||
|
||||
#define to_ide_device(dev)container_of(dev, ide_drive_t, gendev)
|
||||
|
@ -794,7 +795,7 @@ typedef struct hwif_s {
|
|||
unsigned sg_mapped : 1; /* sg_table and sg_nents are ready */
|
||||
|
||||
struct device gendev;
|
||||
struct semaphore gendev_rel_sem; /* To deal with device release() */
|
||||
struct completion gendev_rel_comp; /* To deal with device release() */
|
||||
|
||||
void *hwif_data; /* extra hwif data */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue