2008-03-28 12:52:37

by David Fries

[permalink] [raw]
Subject: [PATCH 30/35] W1: ds2490.c ds_reset remove ds_wait_status

ds_2490.c 1.16
ds_reset no longer calls ds_wait_status, the result wasn't used and it
would only delay the following data operations.

Signed-off-by: David Fries <[email protected]>
---
drivers/w1/masters/ds2490.c | 17 +++--------------
1 files changed, 3 insertions(+), 14 deletions(-)

diff --git a/drivers/w1/masters/ds2490.c b/drivers/w1/masters/ds2490.c
index 1e04ee4..1a87979 100644
--- a/drivers/w1/masters/ds2490.c
+++ b/drivers/w1/masters/ds2490.c
@@ -456,23 +456,15 @@ static int ds_wait_status(struct ds_device *dev, struct ds_status *st)
return 0;
}

-static int ds_reset(struct ds_device *dev, struct ds_status *st)
+static int ds_reset(struct ds_device *dev)
{
int err;

- //err = ds_send_control(dev, COMM_1_WIRE_RESET | COMM_F | COMM_IM | COMM_SE, SPEED_FLEXIBLE);
+ /*err = ds_send_control(dev, COMM_1_WIRE_RESET | COMM_F | COMM_IM | COMM_SE, SPEED_FLEXIBLE); */
err = ds_send_control(dev, 0x43, SPEED_NORMAL);
if (err)
return err;

- ds_wait_status(dev, st);
-#if 0
- if (st->command_buffer_status) {
- printk(KERN_INFO "Short circuit.\n");
- return -EIO;
- }
-#endif
-
return 0;
}

@@ -808,12 +800,9 @@ static u8 ds9490r_read_block(void *data, u8 *buf, int len)
static u8 ds9490r_reset(void *data)
{
struct ds_device *dev = data;
- struct ds_status st;
int err;

- memset(&st, 0, sizeof(st));
-
- err = ds_reset(dev, &st);
+ err = ds_reset(dev);
if (err)
return 1;

--
1.4.4.4


Attachments:
(No filename) (1.40 kB)
(No filename) (189.00 B)
Download all attachments