Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a2cc2428 authored by Axel Lin's avatar Axel Lin Committed by Guenter Roeck
Browse files

hwmon: (adt7462) Avoid forward declaration



Reorder functions to avoid forward declaration.

Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent d82d5776
Loading
Loading
Loading
Loading
+18 −24
Original line number Original line Diff line number Diff line
@@ -232,30 +232,6 @@ struct adt7462_data {
	u8			alarms[ADT7462_ALARM_REG_COUNT];
	u8			alarms[ADT7462_ALARM_REG_COUNT];
};
};


static int adt7462_probe(struct i2c_client *client,
			 const struct i2c_device_id *id);
static int adt7462_detect(struct i2c_client *client,
			  struct i2c_board_info *info);
static int adt7462_remove(struct i2c_client *client);

static const struct i2c_device_id adt7462_id[] = {
	{ "adt7462", 0 },
	{ }
};
MODULE_DEVICE_TABLE(i2c, adt7462_id);

static struct i2c_driver adt7462_driver = {
	.class		= I2C_CLASS_HWMON,
	.driver = {
		.name	= "adt7462",
	},
	.probe		= adt7462_probe,
	.remove		= adt7462_remove,
	.id_table	= adt7462_id,
	.detect		= adt7462_detect,
	.address_list	= normal_i2c,
};

/*
/*
 * 16-bit registers on the ADT7462 are low-byte first.  The data sheet says
 * 16-bit registers on the ADT7462 are low-byte first.  The data sheet says
 * that the low byte must be read before the high byte.
 * that the low byte must be read before the high byte.
@@ -1967,6 +1943,24 @@ static int adt7462_remove(struct i2c_client *client)
	return 0;
	return 0;
}
}


static const struct i2c_device_id adt7462_id[] = {
	{ "adt7462", 0 },
	{ }
};
MODULE_DEVICE_TABLE(i2c, adt7462_id);

static struct i2c_driver adt7462_driver = {
	.class		= I2C_CLASS_HWMON,
	.driver = {
		.name	= "adt7462",
	},
	.probe		= adt7462_probe,
	.remove		= adt7462_remove,
	.id_table	= adt7462_id,
	.detect		= adt7462_detect,
	.address_list	= normal_i2c,
};

module_i2c_driver(adt7462_driver);
module_i2c_driver(adt7462_driver);


MODULE_AUTHOR("Darrick J. Wong <darrick.wong@oracle.com>");
MODULE_AUTHOR("Darrick J. Wong <darrick.wong@oracle.com>");