staging: ipack: make function tables const.
Make some variables const: 1. bus oerations table 2. driver name 3. tpci control register table Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
6aa2039d81
commit
9869a937d3
3 changed files with 10 additions and 10 deletions
|
@ -14,10 +14,8 @@
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include "tpci200.h"
|
#include "tpci200.h"
|
||||||
|
|
||||||
static struct ipack_bus_ops tpci200_bus_ops;
|
|
||||||
|
|
||||||
/* TPCI200 controls registers */
|
/* TPCI200 controls registers */
|
||||||
static int control_reg[] = {
|
static const int control_reg[] = {
|
||||||
TPCI200_CONTROL_A_REG,
|
TPCI200_CONTROL_A_REG,
|
||||||
TPCI200_CONTROL_B_REG,
|
TPCI200_CONTROL_B_REG,
|
||||||
TPCI200_CONTROL_C_REG,
|
TPCI200_CONTROL_C_REG,
|
||||||
|
@ -532,7 +530,7 @@ static void tpci200_uninstall(struct tpci200_board *tpci200)
|
||||||
kfree(tpci200->slots);
|
kfree(tpci200->slots);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct ipack_bus_ops tpci200_bus_ops = {
|
static const struct ipack_bus_ops tpci200_bus_ops = {
|
||||||
.map_space = tpci200_slot_map_space,
|
.map_space = tpci200_slot_map_space,
|
||||||
.unmap_space = tpci200_slot_unmap_space,
|
.unmap_space = tpci200_slot_unmap_space,
|
||||||
.request_irq = tpci200_request_irq,
|
.request_irq = tpci200_request_irq,
|
||||||
|
|
|
@ -209,7 +209,7 @@ static struct bus_type ipack_bus_type = {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ipack_bus_device *ipack_bus_register(struct device *parent, int slots,
|
struct ipack_bus_device *ipack_bus_register(struct device *parent, int slots,
|
||||||
struct ipack_bus_ops *ops)
|
const struct ipack_bus_ops *ops)
|
||||||
{
|
{
|
||||||
int bus_nr;
|
int bus_nr;
|
||||||
struct ipack_bus_device *bus;
|
struct ipack_bus_device *bus;
|
||||||
|
@ -241,7 +241,7 @@ int ipack_bus_unregister(struct ipack_bus_device *bus)
|
||||||
EXPORT_SYMBOL_GPL(ipack_bus_unregister);
|
EXPORT_SYMBOL_GPL(ipack_bus_unregister);
|
||||||
|
|
||||||
int ipack_driver_register(struct ipack_driver *edrv, struct module *owner,
|
int ipack_driver_register(struct ipack_driver *edrv, struct module *owner,
|
||||||
char *name)
|
const char *name)
|
||||||
{
|
{
|
||||||
edrv->driver.owner = owner;
|
edrv->driver.owner = owner;
|
||||||
edrv->driver.name = name;
|
edrv->driver.name = name;
|
||||||
|
|
|
@ -134,7 +134,7 @@ struct ipack_bus_device {
|
||||||
struct device *parent;
|
struct device *parent;
|
||||||
int slots;
|
int slots;
|
||||||
int bus_nr;
|
int bus_nr;
|
||||||
struct ipack_bus_ops *ops;
|
const struct ipack_bus_ops *ops;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -148,7 +148,7 @@ struct ipack_bus_device {
|
||||||
* available bus device in ipack.
|
* available bus device in ipack.
|
||||||
*/
|
*/
|
||||||
struct ipack_bus_device *ipack_bus_register(struct device *parent, int slots,
|
struct ipack_bus_device *ipack_bus_register(struct device *parent, int slots,
|
||||||
struct ipack_bus_ops *ops);
|
const struct ipack_bus_ops *ops);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ipack_bus_unregister -- unregister an ipack bus
|
* ipack_bus_unregister -- unregister an ipack bus
|
||||||
|
@ -161,7 +161,8 @@ int ipack_bus_unregister(struct ipack_bus_device *bus);
|
||||||
* Called by a ipack driver to register itself as a driver
|
* Called by a ipack driver to register itself as a driver
|
||||||
* that can manage ipack devices.
|
* that can manage ipack devices.
|
||||||
*/
|
*/
|
||||||
int ipack_driver_register(struct ipack_driver *edrv, struct module *owner, char *name);
|
int ipack_driver_register(struct ipack_driver *edrv, struct module *owner,
|
||||||
|
const char *name);
|
||||||
void ipack_driver_unregister(struct ipack_driver *edrv);
|
void ipack_driver_unregister(struct ipack_driver *edrv);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -174,7 +175,8 @@ void ipack_driver_unregister(struct ipack_driver *edrv);
|
||||||
* Register a new ipack device (mezzanine device). The call is done by
|
* Register a new ipack device (mezzanine device). The call is done by
|
||||||
* the carrier device driver.
|
* the carrier device driver.
|
||||||
*/
|
*/
|
||||||
struct ipack_device *ipack_device_register(struct ipack_bus_device *bus, int slot, int irqv);
|
struct ipack_device *ipack_device_register(struct ipack_bus_device *bus,
|
||||||
|
int slot, int irqv);
|
||||||
void ipack_device_unregister(struct ipack_device *dev);
|
void ipack_device_unregister(struct ipack_device *dev);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue