asmc.c (271975) | asmc.c (273174) |
---|---|
1/*- 2 * Copyright (c) 2007, 2008 Rui Paulo <rpaulo@FreeBSD.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 19 unchanged lines hidden (view full) --- 28/* 29 * Driver for Apple's System Management Console (SMC). 30 * SMC can be found on the MacBook, MacBook Pro and Mac Mini. 31 * 32 * Inspired by the Linux applesmc driver. 33 */ 34 35#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2007, 2008 Rui Paulo <rpaulo@FreeBSD.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 19 unchanged lines hidden (view full) --- 28/* 29 * Driver for Apple's System Management Console (SMC). 30 * SMC can be found on the MacBook, MacBook Pro and Mac Mini. 31 * 32 * Inspired by the Linux applesmc driver. 33 */ 34 35#include <sys/cdefs.h> |
36__FBSDID("$FreeBSD: head/sys/dev/asmc/asmc.c 271975 2014-09-22 16:20:38Z rpaulo $"); | 36__FBSDID("$FreeBSD: head/sys/dev/asmc/asmc.c 273174 2014-10-16 18:04:43Z davide $"); |
37 38#include <sys/param.h> 39#include <sys/bus.h> 40#include <sys/conf.h> 41#include <sys/kernel.h> 42#include <sys/lock.h> 43#include <sys/malloc.h> 44#include <sys/module.h> --- 260 unchanged lines hidden (view full) --- 305MODULE_DEPEND(asmc, acpi, 1, 1, 1); 306 307static struct asmc_model * 308asmc_match(device_t dev) 309{ 310 int i; 311 char *model; 312 | 37 38#include <sys/param.h> 39#include <sys/bus.h> 40#include <sys/conf.h> 41#include <sys/kernel.h> 42#include <sys/lock.h> 43#include <sys/malloc.h> 44#include <sys/module.h> --- 260 unchanged lines hidden (view full) --- 305MODULE_DEPEND(asmc, acpi, 1, 1, 1); 306 307static struct asmc_model * 308asmc_match(device_t dev) 309{ 310 int i; 311 char *model; 312 |
313 model = getenv("smbios.system.product"); | 313 model = kern_getenv("smbios.system.product"); |
314 if (model == NULL) 315 return (NULL); 316 317 for (i = 0; asmc_models[i].smc_model; i++) { 318 if (!strncmp(model, asmc_models[i].smc_model, strlen(model))) { 319 freeenv(model); 320 return (&asmc_models[i]); 321 } --- 1021 unchanged lines hidden --- | 314 if (model == NULL) 315 return (NULL); 316 317 for (i = 0; asmc_models[i].smc_model; i++) { 318 if (!strncmp(model, asmc_models[i].smc_model, strlen(model))) { 319 freeenv(model); 320 return (&asmc_models[i]); 321 } --- 1021 unchanged lines hidden --- |