* [PATCH 1/2] at24: make input buffers of at24_*write() const
@ 2009-04-07 20:44 Geert Uytterhoeven
2009-04-07 20:44 ` [PATCH 2/2] at25: make input buffers of at25_*write() const Geert Uytterhoeven
0 siblings, 1 reply; 2+ messages in thread
From: Geert Uytterhoeven @ 2009-04-07 20:44 UTC (permalink / raw)
To: Jean Delvare, Kevin Hilman, David Brownell
Cc: Andrew Morton, linux-kernel, Geert Uytterhoeven
| drivers/misc/eeprom/at24.c:508: warning: assignment from incompatible pointer
type
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
drivers/misc/eeprom/at24.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c
index d184dfa..db39f4a 100644
--- a/drivers/misc/eeprom/at24.c
+++ b/drivers/misc/eeprom/at24.c
@@ -278,7 +278,7 @@ static ssize_t at24_bin_read(struct kobject *kobj, struct bin_attribute *attr,
* We only use page mode writes; the alternative is sloooow. This routine
* writes at most one page.
*/
-static ssize_t at24_eeprom_write(struct at24_data *at24, char *buf,
+static ssize_t at24_eeprom_write(struct at24_data *at24, const char *buf,
unsigned offset, size_t count)
{
struct i2c_client *client;
@@ -347,8 +347,8 @@ static ssize_t at24_eeprom_write(struct at24_data *at24, char *buf,
return -ETIMEDOUT;
}
-static ssize_t at24_write(struct at24_data *at24,
- char *buf, loff_t off, size_t count)
+static ssize_t at24_write(struct at24_data *at24, const char *buf, loff_t off,
+ size_t count)
{
ssize_t retval = 0;
@@ -406,7 +406,7 @@ static ssize_t at24_macc_read(struct memory_accessor *macc, char *buf,
return at24_read(at24, buf, offset, count);
}
-static ssize_t at24_macc_write(struct memory_accessor *macc, char *buf,
+static ssize_t at24_macc_write(struct memory_accessor *macc, const char *buf,
off_t offset, size_t count)
{
struct at24_data *at24 = container_of(macc, struct at24_data, macc);
--
1.6.2.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 2/2] at25: make input buffers of at25_*write() const
2009-04-07 20:44 [PATCH 1/2] at24: make input buffers of at24_*write() const Geert Uytterhoeven
@ 2009-04-07 20:44 ` Geert Uytterhoeven
0 siblings, 0 replies; 2+ messages in thread
From: Geert Uytterhoeven @ 2009-04-07 20:44 UTC (permalink / raw)
To: Jean Delvare, Kevin Hilman, David Brownell
Cc: Andrew Morton, linux-kernel, Geert Uytterhoeven
| drivers/misc/eeprom/at25.c:358: warning: assignment from incompatible pointer type
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
drivers/misc/eeprom/at25.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/misc/eeprom/at25.c b/drivers/misc/eeprom/at25.c
index 6bc0dac..b34cb5f 100644
--- a/drivers/misc/eeprom/at25.c
+++ b/drivers/misc/eeprom/at25.c
@@ -140,7 +140,8 @@ at25_bin_read(struct kobject *kobj, struct bin_attribute *bin_attr,
static ssize_t
-at25_ee_write(struct at25_data *at25, char *buf, loff_t off, size_t count)
+at25_ee_write(struct at25_data *at25, const char *buf, loff_t off,
+ size_t count)
{
ssize_t status = 0;
unsigned written = 0;
@@ -276,7 +277,7 @@ static ssize_t at25_mem_read(struct memory_accessor *mem, char *buf,
return at25_ee_read(at25, buf, offset, count);
}
-static ssize_t at25_mem_write(struct memory_accessor *mem, char *buf,
+static ssize_t at25_mem_write(struct memory_accessor *mem, const char *buf,
off_t offset, size_t count)
{
struct at25_data *at25 = container_of(mem, struct at25_data, mem);
--
1.6.2.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-04-07 20:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-07 20:44 [PATCH 1/2] at24: make input buffers of at24_*write() const Geert Uytterhoeven
2009-04-07 20:44 ` [PATCH 2/2] at25: make input buffers of at25_*write() const Geert Uytterhoeven
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®