git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
drivers
/
i2c
/
chips
/
ds1374.c
diff --git
a/drivers/i2c/chips/ds1374.c
b/drivers/i2c/chips/ds1374.c
index
4630f19
..
15edf40
100644
(file)
--- a/
drivers/i2c/chips/ds1374.c
+++ b/
drivers/i2c/chips/ds1374.c
@@
-140,12
+140,14
@@
ulong ds1374_get_rtc_time(void)
return t1;
}
return t1;
}
-static void ds1374_set_work(void *arg)
+static ulong new_time;
+
+static void ds1374_set_work(struct work_struct *work)
{
ulong t1, t2;
int limit = 10; /* arbitrary retry limit */
{
ulong t1, t2;
int limit = 10; /* arbitrary retry limit */
- t1 =
*(ulong *) arg
;
+ t1 =
new_time
;
mutex_lock(&ds1374_mutex);
mutex_lock(&ds1374_mutex);
@@
-167,11
+169,9
@@
static void ds1374_set_work(void *arg)
"can't confirm time set from rtc chip\n");
}
"can't confirm time set from rtc chip\n");
}
-static ulong new_time;
-
static struct workqueue_struct *ds1374_workqueue;
static struct workqueue_struct *ds1374_workqueue;
-static DECLARE_WORK(ds1374_work, ds1374_set_work
, &new_time
);
+static DECLARE_WORK(ds1374_work, ds1374_set_work);
int ds1374_set_rtc_time(ulong nowtime)
{
int ds1374_set_rtc_time(ulong nowtime)
{
@@
-180,7
+180,7
@@
int ds1374_set_rtc_time(ulong nowtime)
if (in_interrupt())
queue_work(ds1374_workqueue, &ds1374_work);
else
if (in_interrupt())
queue_work(ds1374_workqueue, &ds1374_work);
else
- ds1374_set_work(
&new_time
);
+ ds1374_set_work(
NULL
);
return 0;
}
return 0;
}