/* axon_ram_direct_access - direct_access() method for block device @device, @sector, @data: see block_device_operations method  */
static int axon_ram_direct_access(struct block_device *device, sector_t sector, void **kaddr, unsigned long *pfn)
/* axon_ram_direct_access - direct_access() method for block device @device, @sector, @data: see block_device_operations method  */
static int axon_ram_direct_access(struct block_device *device, sector_t sector, void **kaddr, unsigned long *pfn)
{
	struct axon_ram_bank *bank = device->bd_disk->private_data;
	loff_t offset;
	offset = sector;
	if (device->bd_part != NULL)
		offset += device->bd_part->start_sect;
	offset <<= AXON_RAM_SECTOR_SHIFT;
	if (offset >= bank->size) {
		dev_err(&bank->device->dev, "Access outside of address space\n");
		return -ERANGE;
	}
	*kaddr = (void *)(bank->ph_addr + offset);
	*pfn = virt_to_phys(kaddr) >> PAGE_SHIFT;
	return 0;
}