Commit cf09112d authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'for-linus-4.5' of git://git.code.sf.net/p/openipmi/linux-ipmi

Pull ipmi updates from Corey Minyard:
 "Some minor changes that have been in linux-next for a while"

* tag 'for-linus-4.5' of git://git.code.sf.net/p/openipmi/linux-ipmi:
  ipmi: Remove unnecessary pci_disable_device.
  char: ipmi: Drop owner assignment from i2c_driver
  ipmi: constify some struct and char arrays
parents 1c5ff2ab bb0dcebe
...@@ -472,9 +472,10 @@ static DEFINE_MUTEX(smi_watchers_mutex); ...@@ -472,9 +472,10 @@ static DEFINE_MUTEX(smi_watchers_mutex);
#define ipmi_get_stat(intf, stat) \ #define ipmi_get_stat(intf, stat) \
((unsigned int) atomic_read(&(intf)->stats[IPMI_STAT_ ## stat])) ((unsigned int) atomic_read(&(intf)->stats[IPMI_STAT_ ## stat]))
static char *addr_src_to_str[] = { "invalid", "hotmod", "hardcoded", "SPMI", static const char * const addr_src_to_str[] = {
"ACPI", "SMBIOS", "PCI", "invalid", "hotmod", "hardcoded", "SPMI", "ACPI", "SMBIOS", "PCI",
"device-tree", "default" }; "device-tree", "default"
};
const char *ipmi_addr_src_to_str(enum ipmi_addr_src src) const char *ipmi_addr_src_to_str(enum ipmi_addr_src src)
{ {
......
...@@ -105,7 +105,8 @@ enum si_intf_state { ...@@ -105,7 +105,8 @@ enum si_intf_state {
enum si_type { enum si_type {
SI_KCS, SI_SMIC, SI_BT SI_KCS, SI_SMIC, SI_BT
}; };
static char *si_to_str[] = { "kcs", "smic", "bt" };
static const char * const si_to_str[] = { "kcs", "smic", "bt" };
#define DEVICE_NAME "ipmi_si" #define DEVICE_NAME "ipmi_si"
...@@ -1341,7 +1342,7 @@ static unsigned int num_slave_addrs; ...@@ -1341,7 +1342,7 @@ static unsigned int num_slave_addrs;
#define IPMI_IO_ADDR_SPACE 0 #define IPMI_IO_ADDR_SPACE 0
#define IPMI_MEM_ADDR_SPACE 1 #define IPMI_MEM_ADDR_SPACE 1
static char *addr_space_to_str[] = { "i/o", "mem" }; static const char * const addr_space_to_str[] = { "i/o", "mem" };
static int hotmod_handler(const char *val, struct kernel_param *kp); static int hotmod_handler(const char *val, struct kernel_param *kp);
...@@ -1723,27 +1724,31 @@ static int mem_setup(struct smi_info *info) ...@@ -1723,27 +1724,31 @@ static int mem_setup(struct smi_info *info)
*/ */
enum hotmod_op { HM_ADD, HM_REMOVE }; enum hotmod_op { HM_ADD, HM_REMOVE };
struct hotmod_vals { struct hotmod_vals {
char *name; const char *name;
int val; const int val;
}; };
static struct hotmod_vals hotmod_ops[] = {
static const struct hotmod_vals hotmod_ops[] = {
{ "add", HM_ADD }, { "add", HM_ADD },
{ "remove", HM_REMOVE }, { "remove", HM_REMOVE },
{ NULL } { NULL }
}; };
static struct hotmod_vals hotmod_si[] = {
static const struct hotmod_vals hotmod_si[] = {
{ "kcs", SI_KCS }, { "kcs", SI_KCS },
{ "smic", SI_SMIC }, { "smic", SI_SMIC },
{ "bt", SI_BT }, { "bt", SI_BT },
{ NULL } { NULL }
}; };
static struct hotmod_vals hotmod_as[] = {
static const struct hotmod_vals hotmod_as[] = {
{ "mem", IPMI_MEM_ADDR_SPACE }, { "mem", IPMI_MEM_ADDR_SPACE },
{ "i/o", IPMI_IO_ADDR_SPACE }, { "i/o", IPMI_IO_ADDR_SPACE },
{ NULL } { NULL }
}; };
static int parse_str(struct hotmod_vals *v, int *val, char *name, char **curr) static int parse_str(const struct hotmod_vals *v, int *val, char *name,
char **curr)
{ {
char *s; char *s;
int i; int i;
...@@ -2554,7 +2559,6 @@ static void ipmi_pci_remove(struct pci_dev *pdev) ...@@ -2554,7 +2559,6 @@ static void ipmi_pci_remove(struct pci_dev *pdev)
{ {
struct smi_info *info = pci_get_drvdata(pdev); struct smi_info *info = pci_get_drvdata(pdev);
cleanup_one_si(info); cleanup_one_si(info);
pci_disable_device(pdev);
} }
static const struct pci_device_id ipmi_pci_devices[] = { static const struct pci_device_id ipmi_pci_devices[] = {
...@@ -2870,7 +2874,7 @@ static int ipmi_parisc_remove(struct parisc_device *dev) ...@@ -2870,7 +2874,7 @@ static int ipmi_parisc_remove(struct parisc_device *dev)
return 0; return 0;
} }
static struct parisc_device_id ipmi_parisc_tbl[] = { static const struct parisc_device_id ipmi_parisc_tbl[] = {
{ HPHW_MC, HVERSION_REV_ANY_ID, 0x004, 0xC0 }, { HPHW_MC, HVERSION_REV_ANY_ID, 0x004, 0xC0 },
{ 0, } { 0, }
}; };
...@@ -3444,8 +3448,8 @@ static inline void wait_for_timer_and_thread(struct smi_info *smi_info) ...@@ -3444,8 +3448,8 @@ static inline void wait_for_timer_and_thread(struct smi_info *smi_info)
static const struct ipmi_default_vals static const struct ipmi_default_vals
{ {
int type; const int type;
int port; const int port;
} ipmi_defaults[] = } ipmi_defaults[] =
{ {
{ .type = SI_KCS, .port = 0xca2 }, { .type = SI_KCS, .port = 0xca2 },
......
...@@ -1959,7 +1959,6 @@ MODULE_DEVICE_TABLE(i2c, ssif_id); ...@@ -1959,7 +1959,6 @@ MODULE_DEVICE_TABLE(i2c, ssif_id);
static struct i2c_driver ssif_i2c_driver = { static struct i2c_driver ssif_i2c_driver = {
.class = I2C_CLASS_HWMON, .class = I2C_CLASS_HWMON,
.driver = { .driver = {
.owner = THIS_MODULE,
.name = DEVICE_NAME .name = DEVICE_NAME
}, },
.probe = ssif_probe, .probe = ssif_probe,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment