91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 35.36MB
    文件類型: .bz2
    金幣: 2
    下載: 1 次
    發布日期: 2023-06-21
  • 語言: 其他
  • 標簽: kernel??linux??2.6.11??

資源簡介

《深入理解linux內核》第三版的源代碼,linux 2.6.11版本,適合在閱讀的時候查看。

資源截圖

代碼片段和文件信息

/*
?*??acpi_ac.c?-?ACPI?AC?Adapter?Driver?($Revision:?27?$)
?*
?*??Copyright?(C)?2001?2002?Andy?Grover?
?*??Copyright?(C)?2001?2002?Paul?Diefenbaugh?
?*
?*?~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
?*
?*??This?program?is?free?software;?you?can?redistribute?it?and/or?modify
?*??it?under?the?terms?of?the?GNU?General?Public?License?as?published?by
?*??the?Free?Software?Foundation;?either?version?2?of?the?License?or?(at
?*??your?option)?any?later?version.
?*
?*??This?program?is?distributed?in?the?hope?that?it?will?be?useful?but
?*??WITHOUT?ANY?WARRANTY;?without?even?the?implied?warranty?of
?*??MERCHANTABILITY?or?FITNESS?FOR?A?PARTICULAR?PURPOSE.??See?the?GNU
?*??General?Public?License?for?more?details.
?*
?*??You?should?have?received?a?copy?of?the?GNU?General?Public?License?along
?*??with?this?program;?if?not?write?to?the?Free?Software?Foundation?Inc.
?*??59?Temple?Place?Suite?330?Boston?MA?02111-1307?USA.
?*
?*?~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
?*/

#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?


#define?ACPI_AC_COMPONENT 0x00020000
#define?ACPI_AC_CLASS “ac_adapter“
#define?ACPI_AC_HID? “ACPI0003“
#define?ACPI_AC_DRIVER_NAME “ACPI?AC?Adapter?Driver“
#define?ACPI_AC_DEVICE_NAME “AC?Adapter“
#define?ACPI_AC_FILE_STATE “state“
#define?ACPI_AC_NOTIFY_STATUS 0x80
#define?ACPI_AC_STATUS_OFFLINE 0x00
#define?ACPI_AC_STATUS_ONLINE 0x01
#define?ACPI_AC_STATUS_UNKNOWN 0xFF

#define?_COMPONENT ACPI_AC_COMPONENT
ACPI_MODULE_NAME (“acpi_ac“)

MODULE_AUTHOR(“Paul?Diefenbaugh“);
MODULE_DEscriptION(ACPI_AC_DRIVER_NAME);
MODULE_LICENSE(“GPL“);

int?acpi_ac_add?(struct?acpi_device?*device);
int?acpi_ac_remove?(struct?acpi_device?*device?int?type);
static?int?acpi_ac_open_fs(struct?inode?*inode?struct?file?*file);

static?struct?acpi_driver?acpi_ac_driver?=?{
.name?= ACPI_AC_DRIVER_NAME
.class?= ACPI_AC_CLASS
.ids?= ACPI_AC_HID
.ops?= {
.add?= acpi_ac_add
.remove?= acpi_ac_remove
}
};

struct?acpi_ac?{
acpi_handle handle;
unsigned?long state;
};

static?struct?file_operations?acpi_ac_fops?=?{
.open =?acpi_ac_open_fs
.read =?seq_read
.llseek =?seq_lseek
.release =?single_release
};

/*?--------------------------------------------------------------------------
???????????????????????????????AC?Adapter?Management
???--------------------------------------------------------------------------?*/

static?int
acpi_ac_get_state?(
struct?acpi_ac *ac)
{
acpi_status status?=?AE_OK;

ACPI_FUNCTION_TRACE(“acpi_ac_get_state“);

if?(!ac)
return_VALUE(-EINVAL);

status?=?acpi_evaluate_integer(ac->handle?“_PSR“?NULL?&ac->state);
if?(ACPI_FAILURE(status))?{
ACPI_DEBUG_PRINT((ACPI_DB_ERROR
“Error?reading?AC?Adap

評論

共有 條評論