/* Initializes the K6 PowerNow! support. Returns -ENODEV on unsupported devices, -EINVAL or -ENOMEM on problems during initiatization, and zero on success.  */
static int __init powernow_k6_init(void)
/* Initializes the K6 PowerNow! support. Returns -ENODEV on unsupported devices, -EINVAL or -ENOMEM on problems during initiatization, and zero on success.  */
static int __init powernow_k6_init(void)
{
	struct cpuinfo_x86 *c = &cpu_data(0);
	if ((c->x86_vendor != X86_VENDOR_AMD) || (c->x86 != 5) ||
		((c->x86_model != 12) && (c->x86_model != 13)))
		return -ENODEV;
	if (!request_region(POWERNOW_IOPORT, 16, "PowerNow!")) {
		printk(KERN_INFO PFX "PowerNow IOPORT region already used.\n");
		return -EIO;
	}
	if (cpufreq_register_driver(&powernow_k6_driver)) {
		release_region(POWERNOW_IOPORT, 16);
		return -EINVAL;
	}
	return 0;
}