亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? dvb_i2c.c

?? linux環(huán)境下的dvb驅(qū)動(dòng)程序
?? C
字號(hào):
/* * dvb_i2c.h: simplified i2c interface for DVB adapters to get rid of i2c-core.c * * Copyright (C) 2002 Holger Waechtler for convergence integrated media GmbH * * 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. * Or, point your browser to http://www.gnu.org/copyleft/gpl.html */#include <linux/errno.h>#include <linux/slab.h>#include <linux/list.h>#include <linux/module.h>#include <asm/semaphore.h>#include "dvb_i2c.h"#include "dvb_functions.h"struct dvb_i2c_device {	struct list_head list_head;	struct module *owner;	int (*attach) (struct dvb_i2c_bus *i2c, void **data);	void (*detach) (struct dvb_i2c_bus *i2c, void *data);	void *data;};LIST_HEAD(dvb_i2c_buslist);LIST_HEAD(dvb_i2c_devicelist);DECLARE_MUTEX(dvb_i2c_mutex);static int register_i2c_client (struct dvb_i2c_bus *i2c, struct dvb_i2c_device *dev){	struct dvb_i2c_device *client;	if (!(client = kmalloc (sizeof (struct dvb_i2c_device), GFP_KERNEL)))		return -ENOMEM;	client->detach = dev->detach;	client->owner = dev->owner;	client->data = dev->data;	INIT_LIST_HEAD(&client->list_head);	list_add_tail (&client->list_head, &i2c->client_list);	return 0;}static void try_attach_device (struct dvb_i2c_bus *i2c, struct dvb_i2c_device *dev){	if (dev->owner) {		if (!try_module_get(dev->owner))			return;	}	if (dev->attach (i2c, &dev->data) == 0) {		register_i2c_client (i2c, dev);	} else {		if (dev->owner)			module_put (dev->owner);	}}static void detach_device (struct dvb_i2c_bus *i2c, struct dvb_i2c_device *dev){	dev->detach (i2c, dev->data);	if (dev->owner)		module_put (dev->owner);}static void unregister_i2c_client_from_bus (struct dvb_i2c_device *dev,				     struct dvb_i2c_bus *i2c){	struct list_head *entry, *n;	list_for_each_safe (entry, n, &i2c->client_list) {                struct dvb_i2c_device *client;		client = list_entry (entry, struct dvb_i2c_device, list_head);		if (client->detach == dev->detach) {			list_del (entry);			detach_device (i2c, dev);		}	}}static void unregister_i2c_client_from_all_busses (struct dvb_i2c_device *dev){	struct list_head *entry, *n;	list_for_each_safe (entry, n, &dvb_i2c_buslist) {                struct dvb_i2c_bus *i2c;		i2c = list_entry (entry, struct dvb_i2c_bus, list_head);		unregister_i2c_client_from_bus (dev, i2c);	}}static void unregister_all_clients_from_bus (struct dvb_i2c_bus *i2c){	struct list_head *entry, *n;	list_for_each_safe (entry, n, &(i2c->client_list)) {		struct dvb_i2c_device *dev;		dev = list_entry (entry, struct dvb_i2c_device, list_head);		unregister_i2c_client_from_bus (dev, i2c);	}}static void probe_device_on_all_busses (struct dvb_i2c_device *dev){	struct list_head *entry;	list_for_each (entry, &dvb_i2c_buslist) {                struct dvb_i2c_bus *i2c;		i2c = list_entry (entry, struct dvb_i2c_bus, list_head);		try_attach_device (i2c, dev);	}}static void probe_devices_on_bus (struct dvb_i2c_bus *i2c){	struct list_head *entry;	list_for_each (entry, &dvb_i2c_devicelist) {		struct dvb_i2c_device *dev;		dev = list_entry (entry, struct dvb_i2c_device, list_head);		try_attach_device (i2c, dev);	}}static struct dvb_i2c_bus* dvb_find_i2c_bus (int (*xfer) (struct dvb_i2c_bus *i2c,		                                   const struct i2c_msg msgs[],						   int num),				      struct dvb_adapter *adapter,				      int id){	struct list_head *entry;	list_for_each (entry, &dvb_i2c_buslist) {		struct dvb_i2c_bus *i2c;		i2c = list_entry (entry, struct dvb_i2c_bus, list_head);		if (i2c->xfer == xfer && i2c->adapter == adapter && i2c->id == id)			return i2c;	}	return NULL;}struct dvb_i2c_bus*dvb_register_i2c_bus (int (*xfer) (struct dvb_i2c_bus *i2c,				   const struct i2c_msg *msgs, int num),		      void *data, struct dvb_adapter *adapter, int id){	struct dvb_i2c_bus *i2c;	if (down_interruptible (&dvb_i2c_mutex))		return NULL;	if (!(i2c = kmalloc (sizeof (struct dvb_i2c_bus), GFP_KERNEL)))		return NULL;	INIT_LIST_HEAD(&i2c->list_head);	INIT_LIST_HEAD(&i2c->client_list);	i2c->xfer = xfer;	i2c->data = data;	i2c->adapter = adapter;	i2c->id = id;	probe_devices_on_bus (i2c);	list_add_tail (&i2c->list_head, &dvb_i2c_buslist);	up (&dvb_i2c_mutex);	return i2c;}void dvb_unregister_i2c_bus (int (*xfer) (struct dvb_i2c_bus *i2c,					  const struct i2c_msg msgs[], int num),			     struct dvb_adapter *adapter, int id){	struct dvb_i2c_bus *i2c;	down (&dvb_i2c_mutex);	if ((i2c = dvb_find_i2c_bus (xfer, adapter, id))) {		unregister_all_clients_from_bus (i2c);		list_del (&i2c->list_head);		kfree (i2c);	}	up (&dvb_i2c_mutex);}int dvb_register_i2c_device (struct module *owner,			     int (*attach) (struct dvb_i2c_bus *i2c, void **data),			     void (*detach) (struct dvb_i2c_bus *i2c, void *data)){	struct dvb_i2c_device *entry;	if (down_interruptible (&dvb_i2c_mutex))		return -ERESTARTSYS;	if (!(entry = kmalloc (sizeof (struct dvb_i2c_device), GFP_KERNEL)))		return -ENOMEM;	entry->owner = owner;	entry->attach = attach;	entry->detach = detach;	INIT_LIST_HEAD(&entry->list_head);	probe_device_on_all_busses (entry);	list_add_tail (&entry->list_head, &dvb_i2c_devicelist);	up (&dvb_i2c_mutex);	return 0;}int dvb_unregister_i2c_device (int (*attach) (struct dvb_i2c_bus *i2c, void **data)){	struct list_head *entry, *n;	down (&dvb_i2c_mutex);	list_for_each_safe (entry, n, &dvb_i2c_devicelist) {		struct dvb_i2c_device *dev;		dev = list_entry (entry, struct dvb_i2c_device, list_head);		if (dev->attach == attach) {			list_del (entry);			unregister_i2c_client_from_all_busses (dev);			kfree (entry);			up (&dvb_i2c_mutex);			return 0;                }        }	up (&dvb_i2c_mutex);        return -EINVAL;}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99久久精品99国产精品| 亚洲免费伊人电影| 日本欧美大码aⅴ在线播放| 欧美日韩一卡二卡三卡| 偷窥少妇高潮呻吟av久久免费| 欧美视频你懂的| 日本色综合中文字幕| 日韩一区二区免费高清| 激情综合网天天干| 国产欧美日韩不卡| 99精品桃花视频在线观看| ㊣最新国产の精品bt伙计久久| 色综合一个色综合亚洲| 亚洲电影一区二区| 欧美变态tickle挠乳网站| 国产精品一级片| 综合激情成人伊人| 欧美日本一区二区在线观看| 久久成人免费日本黄色| 国产精品欧美极品| 欧美三级电影网| 国产乱人伦偷精品视频免下载| 中文字幕一区在线观看视频| 欧美熟乱第一页| 国产酒店精品激情| 一区二区三区丝袜| 欧美精品一区二区三区蜜臀| 91同城在线观看| 日韩国产精品久久久久久亚洲| 国产午夜精品理论片a级大结局| 色综合久久久久网| 麻豆免费看一区二区三区| 国产精品国产三级国产三级人妇| 欧美天堂亚洲电影院在线播放| 国产乱码精品一区二区三区av| 亚洲一区二区高清| 国产欧美1区2区3区| 欧美剧情片在线观看| 粉嫩欧美一区二区三区高清影视 | 91精品国产综合久久香蕉的特点| 欧美中文字幕不卡| 美国毛片一区二区三区| 综合久久久久综合| 久久综合九色综合97婷婷| 欧美午夜在线一二页| 高清shemale亚洲人妖| 视频一区中文字幕国产| 中文字幕亚洲在| 久久精品一区四区| 欧美一级片在线观看| 色哟哟国产精品| 成人永久aaa| 韩日欧美一区二区三区| 香蕉久久一区二区不卡无毒影院 | 91免费看视频| 国产精品一区二区久激情瑜伽| 爽爽淫人综合网网站| 亚洲男同性视频| 国产精品视频线看| 久久夜色精品国产噜噜av| 欧美一区二区黄| 欧美日免费三级在线| 95精品视频在线| 成人性生交大片免费看在线播放| 久久成人18免费观看| 日欧美一区二区| 亚洲电影视频在线| 亚洲国产精品一区二区www在线 | 欧美国产日韩亚洲一区| 精品999在线播放| 欧美大度的电影原声| 91精品国产乱| 91精品免费在线观看| 欧美日韩高清一区二区不卡| 欧洲生活片亚洲生活在线观看| 97精品久久久午夜一区二区三区 | 91麻豆福利精品推荐| 国产成人免费9x9x人网站视频| 韩国一区二区在线观看| 麻豆视频观看网址久久| 91丨九色丨黑人外教| 东方aⅴ免费观看久久av| 国产精品一区二区无线| 国产精品一级片| 成人美女视频在线观看18| 成人午夜激情影院| 99久久精品99国产精品| 色婷婷综合久色| 欧美日韩精品久久久| 欧美丰满一区二区免费视频| 在线综合视频播放| 欧美成人vps| 国产欧美日本一区二区三区| 国产精品久久久久aaaa樱花 | 欧美高清视频在线高清观看mv色露露十八| 在线视频观看一区| 欧美精品久久99| 精品国产在天天线2019| 国产喷白浆一区二区三区| 国产精品色噜噜| 伊人一区二区三区| 日韩极品在线观看| 国产精品自拍一区| 波多野结衣欧美| 欧美日韩国产中文| 久久亚洲欧美国产精品乐播| 国产精品午夜春色av| 亚洲精品伦理在线| 日本成人在线电影网| 国产一区二区三区四区五区入口| 成人免费精品视频| 欧美艳星brazzers| 精品久久久久香蕉网| 国产精品福利一区二区| 亚洲国产精品一区二区久久恐怖片 | 一区二区在线观看不卡| 偷拍亚洲欧洲综合| 成人久久视频在线观看| 久久精品一区二区三区四区| 国产精品久久久久久福利一牛影视 | 国产精品欧美一级免费| 亚洲1区2区3区4区| 成人在线视频一区二区| 欧美日本精品一区二区三区| 国产片一区二区| 日韩国产一二三区| 99视频国产精品| 日韩三级免费观看| 一区二区理论电影在线观看| 精品一区二区三区久久| 91久久久免费一区二区| 精品福利av导航| 午夜电影久久久| 91免费观看国产| 久久影音资源网| 天堂成人免费av电影一区| 成人午夜又粗又硬又大| 日韩精品一区二| 午夜激情一区二区| 99久久精品免费看国产| 久久久综合激的五月天| 污片在线观看一区二区| 91蝌蚪porny九色| 亚洲国产成人自拍| 韩国三级在线一区| 6080午夜不卡| 亚洲第一福利视频在线| eeuss鲁片一区二区三区在线观看| 日韩三级免费观看| 日本中文字幕一区二区视频| 日本黄色一区二区| 亚洲视频你懂的| 不卡av免费在线观看| 久久久不卡影院| 精品一区中文字幕| 9191精品国产综合久久久久久| 亚洲精品日韩一| heyzo一本久久综合| 欧美国产一区视频在线观看| 韩国av一区二区三区在线观看| 91精品国产欧美一区二区成人| 午夜亚洲福利老司机| 在线视频国内自拍亚洲视频| 亚洲精品视频免费看| 一本色道久久综合亚洲aⅴ蜜桃 | 国产一区视频在线看| 欧美一级日韩免费不卡| 日韩在线a电影| 欧美疯狂性受xxxxx喷水图片| 亚洲成av人影院在线观看网| 欧美性猛交xxxx黑人交| 亚洲国产裸拍裸体视频在线观看乱了| 一本色道久久综合狠狠躁的推荐| 亚洲色图在线看| 91国偷自产一区二区三区观看| 亚洲精品久久久蜜桃| 色婷婷激情久久| 成人深夜视频在线观看| 久久精品视频在线看| 国产一区二区成人久久免费影院 | 久久国产夜色精品鲁鲁99| 色狠狠桃花综合| 国产精品美女一区二区| 99r国产精品| 亚洲制服丝袜av| 69堂成人精品免费视频| 精品一区二区三区在线观看国产| 2021久久国产精品不只是精品| 国产一区二区三区久久悠悠色av| 久久日韩精品一区二区五区| 日韩va欧美va亚洲va久久| 91精品欧美综合在线观看最新| 成人激情av网| 久久99精品国产.久久久久久| 亚洲精品日韩综合观看成人91| 精品三级av在线| 欧美三级在线看| 99久久亚洲一区二区三区青草| 美女一区二区久久| 一区二区三区四区激情|