mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-21 22:51:37 +00:00
block: constify sect_buf argument of ide_write_data
Add a const keyword to the sect_buf argument of ide_write_data to fix the following warning: cmd_ide.c: In function '__ide_output_data': cmd_ide.c:548: warning: passing argument 2 of 'ide_write_data' discards qualifiers from pointer target type /devel/u-boot.git/include/ide.h:76: note: expected 'ulong *' but argument is of type 'const ulong *' Also modify the driver-model documentation to match with the new prototype. Compile tested only. Cc: Macpaul Lin <macpaul@andestech.com> Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
This commit is contained in:
parent
dbb713baa6
commit
c575180bae
3 changed files with 3 additions and 3 deletions
|
@ -93,7 +93,7 @@ I) Overview
|
||||||
uchar ide_read_register(int dev, unsigned int port);
|
uchar ide_read_register(int dev, unsigned int port);
|
||||||
void ide_write_register(int dev, unsigned int port, unsigned char val);
|
void ide_write_register(int dev, unsigned int port, unsigned char val);
|
||||||
void ide_read_data(int dev, ulong *sect_buf, int words);
|
void ide_read_data(int dev, ulong *sect_buf, int words);
|
||||||
void ide_write_data(int dev, ulong *sect_buf, int words);
|
void ide_write_data(int dev, const ulong *sect_buf, int words);
|
||||||
|
|
||||||
The first two functions are called from ide_inb()/ide_outb(), and will
|
The first two functions are called from ide_inb()/ide_outb(), and will
|
||||||
default to direct memory access if CONFIG_IDE_AHB is not set, or
|
default to direct memory access if CONFIG_IDE_AHB is not set, or
|
||||||
|
|
|
@ -81,7 +81,7 @@ void ide_write_register(int dev, unsigned int port, unsigned char val)
|
||||||
IDE_REG_DA_WRITE(port) | val);
|
IDE_REG_DA_WRITE(port) | val);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ide_write_data(int dev, ulong *sect_buf, int words)
|
void ide_write_data(int dev, const ulong *sect_buf, int words)
|
||||||
{
|
{
|
||||||
static struct ftide020_s *ftide020 = (struct ftide020_s *) FTIDE_BASE;
|
static struct ftide020_s *ftide020 = (struct ftide020_s *) FTIDE_BASE;
|
||||||
|
|
||||||
|
|
|
@ -76,7 +76,7 @@ int ide_device_present(int dev);
|
||||||
unsigned char ide_read_register(int dev, unsigned int port);
|
unsigned char ide_read_register(int dev, unsigned int port);
|
||||||
void ide_write_register(int dev, unsigned int port, unsigned char val);
|
void ide_write_register(int dev, unsigned int port, unsigned char val);
|
||||||
void ide_read_data(int dev, ulong *sect_buf, int words);
|
void ide_read_data(int dev, ulong *sect_buf, int words);
|
||||||
void ide_write_data(int dev, ulong *sect_buf, int words);
|
void ide_write_data(int dev, const ulong *sect_buf, int words);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Reference in a new issue