Commit 85c1a254 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'for-linus-5.2' of git://github.com/cminyard/linux-ipmi

Pull IPMI updates from Corey Minyard:
 "Some minor cleanups for the IPMI driver"

* tag 'for-linus-5.2' of git://github.com/cminyard/linux-ipmi:
  ipmi: Remove warning if no slave address is present
  ipmi:ssif: Only unregister the platform driver if it was registered
  ipmi:ssif: compare block number correctly for multi-part return messages
  ipmi: Add the i2c-addr property for SSIF interfaces
  char/ipmi: fix spelling mistake "receieved_messages" -> "received_messages"
  ipmi: avoid atomic_inc in exit function
  ipmi: Remove file from ipmi_file_private
  ipmi_si: remove an unused variable in try_smi_init()
  ipmi: Make ipmi_interfaces_srcu variable static
parents fe460a6d ed6c3a6d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -212,7 +212,7 @@ Description:
					Messages may be broken into parts if
					they are long.

		receieved_messages:	(RO) Number of message responses
		received_messages:	(RO) Number of message responses
					received.

		received_message_parts: (RO) Number of message fragments
+0 −3
Original line number Diff line number Diff line
@@ -29,7 +29,6 @@ struct ipmi_file_private
	struct ipmi_user     *user;
	spinlock_t           recv_msg_lock;
	struct list_head     recv_msgs;
	struct file          *file;
	struct fasync_struct *fasync_queue;
	wait_queue_head_t    wait;
	struct mutex	     recv_mutex;
@@ -95,8 +94,6 @@ static int ipmi_open(struct inode *inode, struct file *file)
	if (!priv)
		return -ENOMEM;

	priv->file = file;

	rv = ipmi_create_user(if_num,
			      &ipmi_hndlrs,
			      priv,
+2 −0
Original line number Diff line number Diff line
@@ -47,9 +47,11 @@ static void __init dmi_add_platform_ipmi(unsigned long base_addr,
	memset(&p, 0, sizeof(p));

	name = "dmi-ipmi-si";
	p.iftype = IPMI_PLAT_IF_SI;
	switch (type) {
	case IPMI_DMI_TYPE_SSIF:
		name = "dmi-ipmi-ssif";
		p.iftype = IPMI_PLAT_IF_SSIF;
		p.type = SI_TYPE_INVALID;
		break;
	case IPMI_DMI_TYPE_BT:
+2 −2
Original line number Diff line number Diff line
@@ -635,7 +635,7 @@ static DEFINE_MUTEX(ipmidriver_mutex);

static LIST_HEAD(ipmi_interfaces);
static DEFINE_MUTEX(ipmi_interfaces_mutex);
struct srcu_struct ipmi_interfaces_srcu;
static struct srcu_struct ipmi_interfaces_srcu;

/*
 * List of watchers that want to know when smi's are added and deleted.
@@ -5179,7 +5179,7 @@ static void __exit cleanup_ipmi(void)
		 * avoids problems with race conditions removing the timer
		 * here.
		 */
		atomic_inc(&stop_operation);
		atomic_set(&stop_operation, 1);
		del_timer_sync(&ipmi_timer);

		initialized = false;
+15 −12
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@ struct platform_device *ipmi_platform_add(const char *name, unsigned int inst,
					  struct ipmi_plat_data *p)
{
	struct platform_device *pdev;
	unsigned int num_r = 1, size, pidx = 0;
	unsigned int num_r = 1, size = 0, pidx = 0;
	struct resource r[4];
	struct property_entry pr[6];
	u32 flags;
@@ -21,11 +21,10 @@ struct platform_device *ipmi_platform_add(const char *name, unsigned int inst,
	memset(pr, 0, sizeof(pr));
	memset(r, 0, sizeof(r));

	if (p->iftype == IPMI_PLAT_IF_SI) {
		if (p->type == SI_BT)
			size = 3;
	else if (p->type == SI_TYPE_INVALID)
		size = 0;
	else
		else if (p->type != SI_TYPE_INVALID)
			size = 2;

		if (p->regsize == 0)
@@ -34,6 +33,10 @@ struct platform_device *ipmi_platform_add(const char *name, unsigned int inst,
			p->regspacing = p->regsize;

		pr[pidx++] = PROPERTY_ENTRY_U8("ipmi-type", p->type);
	} else if (p->iftype == IPMI_PLAT_IF_SSIF) {
		pr[pidx++] = PROPERTY_ENTRY_U16("i2c-addr", p->addr);
	}

	if (p->slave_addr)
		pr[pidx++] = PROPERTY_ENTRY_U8("slave-addr", p->slave_addr);
	pr[pidx++] = PROPERTY_ENTRY_U8("addr-source", p->addr_source);
Loading