2008-10-08 07:29:11

by Anand Gadiyar

[permalink] [raw]
Subject: [PATCH 4/5] W1: Export w1_read_8 function

From: Madhusudhan Chikkature <[email protected]>

This patch exports the w1_read_8 function for use of drivers.

Signed-off-by: Madhusudhan Chikkature <[email protected]>
Acked-by: Evgeniy Polyakov <[email protected]>
---
drivers/w1/w1.h | 1 +
drivers/w1/w1_io.c | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)

Index: linux-2.6/drivers/w1/w1_io.c
===================================================================
--- linux-2.6.orig/drivers/w1/w1_io.c 2008-09-19 13:39:41.000000000 +0530
+++ linux-2.6/drivers/w1/w1_io.c 2008-09-26 16:39:31.000000000 +0530
@@ -177,7 +177,7 @@ u8 w1_triplet(struct w1_master *dev, int
* @param dev the master device
* @return the byte read
*/
-static u8 w1_read_8(struct w1_master * dev)
+u8 w1_read_8(struct w1_master * dev)
{
int i;
u8 res = 0;
@@ -190,6 +190,7 @@ static u8 w1_read_8(struct w1_master * d

return res;
}
+EXPORT_SYMBOL_GPL(w1_read_8);

/**
* Writes a series of bytes.
Index: linux-2.6/drivers/w1/w1.h
===================================================================
--- linux-2.6.orig/drivers/w1/w1.h 2008-09-19 13:39:41.000000000 +0530
+++ linux-2.6/drivers/w1/w1.h 2008-09-26 16:42:45.000000000 +0530
@@ -189,6 +189,7 @@ struct w1_master *w1_search_master_id(u3

u8 w1_triplet(struct w1_master *dev, int bdir);
void w1_write_8(struct w1_master *, u8);
+u8 w1_read_8(struct w1_master *);
int w1_reset_bus(struct w1_master *);
u8 w1_calc_crc8(u8 *, int);
void w1_write_block(struct w1_master *, const u8 *, int);-


2008-10-08 08:23:29

by Anand Gadiyar

[permalink] [raw]
Subject: RE: [PATCH 4/5] W1: Export w1_read_8 function

(Sorry. I missed linux-omap in the CC list for this one.)

> -----Original Message-----
> From: Gadiyar, Anand
> Sent: Wednesday, October 08, 2008 12:55 PM
> To: [email protected]
> Cc: [email protected];
> [email protected]; 'Madhusudhan Chikkature'
> Subject: [PATCH 4/5] W1: Export w1_read_8 function
>
> From: Madhusudhan Chikkature <[email protected]>
>
> This patch exports the w1_read_8 function for use of drivers.
>
> Signed-off-by: Madhusudhan Chikkature <[email protected]>
> Acked-by: Evgeniy Polyakov <[email protected]>
> ---
> drivers/w1/w1.h | 1 +
> drivers/w1/w1_io.c | 3 ++-
> 2 files changed, 3 insertions(+), 1 deletion(-)
>
> Index: linux-2.6/drivers/w1/w1_io.c
> ===================================================================
> --- linux-2.6.orig/drivers/w1/w1_io.c 2008-09-19 13:39:41.000000000 +0530
> +++ linux-2.6/drivers/w1/w1_io.c 2008-09-26 16:39:31.000000000 +0530
> @@ -177,7 +177,7 @@ u8 w1_triplet(struct w1_master *dev, int
> * @param dev the master device
> * @return the byte read
> */
> -static u8 w1_read_8(struct w1_master * dev)
> +u8 w1_read_8(struct w1_master * dev)
> {
> int i;
> u8 res = 0;
> @@ -190,6 +190,7 @@ static u8 w1_read_8(struct w1_master * d
>
> return res;
> }
> +EXPORT_SYMBOL_GPL(w1_read_8);
>
> /**
> * Writes a series of bytes.
> Index: linux-2.6/drivers/w1/w1.h
> ===================================================================
> --- linux-2.6.orig/drivers/w1/w1.h 2008-09-19 13:39:41.000000000 +0530
> +++ linux-2.6/drivers/w1/w1.h 2008-09-26 16:42:45.000000000 +0530
> @@ -189,6 +189,7 @@ struct w1_master *w1_search_master_id(u3
>
> u8 w1_triplet(struct w1_master *dev, int bdir);
> void w1_write_8(struct w1_master *, u8);
> +u8 w1_read_8(struct w1_master *);
> int w1_reset_bus(struct w1_master *);
> u8 w1_calc_crc8(u8 *, int);
> void w1_write_block(struct w1_master *, const u8 *, int);-

2008-10-10 20:45:58

by Andrew Morton

[permalink] [raw]
Subject: Re: [PATCH 4/5] W1: Export w1_read_8 function

On Wed, 8 Oct 2008 12:55:25 +0530
"Gadiyar, Anand" <[email protected]> wrote:

> From: Madhusudhan Chikkature <[email protected]>
>
> This patch exports the w1_read_8 function for use of drivers.
>

The changelog should explain why the export is needed (eg: "used by the
foobar driver").

If, as I assume, this symbol is used by the HDQ driver then this patch
should be staged _ahead_ of those patches to avoid breaking
bisectability, and because that's generally a saner ordering.