/* Note: this tachometer is completely separate from the tachometers used to measure the fan speeds. Only one fan's speed (fan1) is controlled.  */
static ssize_t get_target(struct device *dev, struct device_attribute *devattr, char *buf)
/* Note: this tachometer is completely separate from the tachometers used to measure the fan speeds. Only one fan's speed (fan1) is controlled.  */
static ssize_t get_target(struct device *dev, struct device_attribute *devattr, char *buf)
{
	struct max6650_data *data = max6650_update_device(dev);
	int kscale, ktach, rpm;
	kscale = DIV_FROM_REG(data->config);
	ktach = data->speed;
	rpm = 60 * kscale * clock / (256 * (ktach + 1));
	return sprintf(buf, "%d\n", rpm);
}