return FALSE;
/* Read the appropriate SIGNAL_QUEUE_HEADER into local memory. */
- err = visor_memregion_read(&channel->memregion,
- SIG_QUEUE_OFFSET(&channel->chan_hdr, queue),
- sig_hdr, sizeof(struct signal_queue_header));
+ err = visorchannel_read(channel,
+ SIG_QUEUE_OFFSET(&channel->chan_hdr, queue),
+ sig_hdr, sizeof(struct signal_queue_header));
if (err)
return FALSE;
int signal_data_offset = SIG_DATA_OFFSET(&channel->chan_hdr, queue,
sig_hdr, slot);
- err = visor_memregion_read(&channel->memregion,
- signal_data_offset,
- data, sig_hdr->signal_size);
+ err = visorchannel_read(channel, signal_data_offset,
+ data, sig_hdr->signal_size);
if (err)
return FALSE;
void __iomem *mapped;
};
-int visor_memregion_read(struct memregion *memregion,
- ulong offset, void *dest, ulong nbytes);
int visor_memregion_write(struct memregion *memregion,
ulong offset, void *src, ulong nbytes);
void memregion_dump(struct memregion *memregion, char *s,
#define MYDRVNAME "memregion"
-int
-visor_memregion_read(struct memregion *memregion, ulong offset, void *dest,
- ulong nbytes)
-{
- if (offset + nbytes > memregion->nbytes)
- return -EIO;
-
- memcpy_fromio(dest, memregion->mapped + offset, nbytes);
- return 0;
-}
-EXPORT_SYMBOL_GPL(visor_memregion_read);
-
int
visor_memregion_write(struct memregion *memregion, ulong offset, void *src,
ulong nbytes)