Constification
This commit is contained in:
@@ -166,8 +166,8 @@ stpc_host_write(uint16_t addr, uint8_t val, void *priv)
|
||||
static uint8_t
|
||||
stpc_host_read(uint16_t addr, void *priv)
|
||||
{
|
||||
stpc_t *dev = (stpc_t *) priv;
|
||||
uint8_t ret;
|
||||
const stpc_t *dev = (stpc_t *) priv;
|
||||
uint8_t ret;
|
||||
|
||||
if (addr == dev->host_base)
|
||||
ret = dev->host_offset;
|
||||
@@ -196,8 +196,8 @@ stpc_localbus_write(uint16_t addr, uint8_t val, void *priv)
|
||||
static uint8_t
|
||||
stpc_localbus_read(uint16_t addr, void *priv)
|
||||
{
|
||||
stpc_t *dev = (stpc_t *) priv;
|
||||
uint8_t ret;
|
||||
const stpc_t *dev = (stpc_t *) priv;
|
||||
uint8_t ret;
|
||||
|
||||
if (addr == dev->localbus_base)
|
||||
ret = dev->localbus_offset;
|
||||
@@ -260,8 +260,8 @@ stpc_nb_write(int func, int addr, uint8_t val, void *priv)
|
||||
static uint8_t
|
||||
stpc_nb_read(int func, int addr, void *priv)
|
||||
{
|
||||
stpc_t *dev = (stpc_t *) priv;
|
||||
uint8_t ret;
|
||||
const stpc_t *dev = (stpc_t *) priv;
|
||||
uint8_t ret;
|
||||
|
||||
if (func > 0)
|
||||
ret = 0xff;
|
||||
@@ -445,8 +445,8 @@ stpc_ide_write(int func, int addr, uint8_t val, void *priv)
|
||||
static uint8_t
|
||||
stpc_ide_read(int func, int addr, void *priv)
|
||||
{
|
||||
stpc_t *dev = (stpc_t *) priv;
|
||||
uint8_t ret;
|
||||
const stpc_t *dev = (stpc_t *) priv;
|
||||
uint8_t ret;
|
||||
|
||||
if (func > 0)
|
||||
ret = 0xff;
|
||||
@@ -507,8 +507,8 @@ stpc_isab_write(int func, int addr, uint8_t val, void *priv)
|
||||
static uint8_t
|
||||
stpc_isab_read(int func, int addr, void *priv)
|
||||
{
|
||||
stpc_t *dev = (stpc_t *) priv;
|
||||
uint8_t ret;
|
||||
const stpc_t *dev = (stpc_t *) priv;
|
||||
uint8_t ret;
|
||||
|
||||
if ((func == 1) && (dev->local != STPC_ATLAS))
|
||||
ret = stpc_ide_read(0, addr, priv);
|
||||
@@ -571,8 +571,8 @@ stpc_usb_write(int func, int addr, uint8_t val, void *priv)
|
||||
static uint8_t
|
||||
stpc_usb_read(int func, int addr, void *priv)
|
||||
{
|
||||
stpc_t *dev = (stpc_t *) priv;
|
||||
uint8_t ret;
|
||||
const stpc_t *dev = (stpc_t *) priv;
|
||||
uint8_t ret;
|
||||
|
||||
if (func > 0)
|
||||
ret = 0xff;
|
||||
@@ -614,7 +614,8 @@ stpc_remap_localbus(stpc_t *dev, uint16_t localbus_base)
|
||||
static uint8_t
|
||||
stpc_serial_handlers(uint8_t val)
|
||||
{
|
||||
stpc_serial_t *dev = device_get_priv(&stpc_serial_device);
|
||||
const stpc_serial_t *dev = device_get_priv(&stpc_serial_device);
|
||||
|
||||
if (!dev) {
|
||||
stpc_log("STPC: Not remapping UARTs, disabled by strap (raw %02X)\n", val);
|
||||
return 0;
|
||||
@@ -744,8 +745,8 @@ stpc_reg_write(uint16_t addr, uint8_t val, void *priv)
|
||||
static uint8_t
|
||||
stpc_reg_read(uint16_t addr, void *priv)
|
||||
{
|
||||
stpc_t *dev = (stpc_t *) priv;
|
||||
uint8_t ret;
|
||||
const stpc_t *dev = (stpc_t *) priv;
|
||||
uint8_t ret;
|
||||
|
||||
if (addr == 0x22)
|
||||
ret = dev->reg_offset;
|
||||
@@ -895,7 +896,7 @@ stpc_setup(stpc_t *dev)
|
||||
static void
|
||||
stpc_usb_update_interrupt(usb_t* usb, void* priv)
|
||||
{
|
||||
stpc_t *dev = (stpc_t *) priv;
|
||||
const stpc_t *dev = (stpc_t *) priv;
|
||||
|
||||
if (usb->irq_level)
|
||||
pci_set_irq(dev->usb_slot, PCI_INTA);
|
||||
|
||||
Reference in New Issue
Block a user