Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a6cc48ee authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6:
  Driver core: Remove unneeded get_{device,driver}() calls.
  Driver core: Update some prototypes in platform.txt
  driver core: convert to use class_find_device api
  PM: Export device_pm_schedule_removal
  nozomi: finish constification
  nozomi: constify driver
  nozomi driver update
  Add ja_JP translation of stable_kernel_rules.txt
  kobject: kerneldoc comment fix
  kobject: Always build in kernel/ksysfs.o.
parents 7cf76691 0c98b19f
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -122,15 +122,15 @@ None the less, there are some APIs to support such legacy drivers. Avoid
using these calls except with such hotplug-deficient drivers.

	struct platform_device *platform_device_alloc(
			char *name, unsigned id);
			const char *name, int id);

You can use platform_device_alloc() to dynamically allocate a device, which
you will then initialize with resources and platform_device_register().
A better solution is usually:

	struct platform_device *platform_device_register_simple(
			char *name, unsigned id,
			struct resource *res, unsigned nres);
			const char *name, int id,
			struct resource *res, unsigned int nres);

You can use platform_device_register_simple() as a one-step call to allocate
and register a device.
+79 −0
Original line number Diff line number Diff line
NOTE:
This is Japanese translated version of "Documentation/stable_kernel_rules.txt".
This one is maintained by Tsugikazu Shibata <tshibata@ab.jp.nec.com>
and JF Project team <www.linux.or.jp/JF>.
If you find difference with original file or problem in translation,
please contact maintainer of this file or JF project.

Please also note that purpose of this file is easier to read for non
English natives and do no intended to fork. So, if you have any
comment or update of this file, please try to update Original(English)
file at first.

==================================
これは、
linux-2.6.24/Documentation/stable_kernel_rules.txt
の和訳です。

翻訳団体: JF プロジェクト < http://www.linux.or.jp/JF/ >
翻訳日: 2007/12/30
翻訳者: Tsugikazu Shibata <tshibata at ab dot jp dot nec dot com>
æ ¡æ­£è€…ï¼š 武井伸光さん、<takei at webmasters dot gr dot jp>
         かねこさん (Seiji Kaneko) <skaneko at a2 dot mbn dot or dot jp>
         小林 雅典さん (Masanori Kobayasi) <zap03216 at nifty dot ne dot jp>
         野口さん (Kenji Noguchi) <tokyo246 at gmail dot com>
         神宮信太郎さん <jin at libjingu dot jp>
==================================

ずっと知りたかった Linux 2.6 -stable リリースの全て

"-stable" ツリーにどのような種類のパッチが受け入れられるか、どのような
ものが受け入れられないか、についての規則-

 - 明らかに正しく、テストされているものでなければならない。
 - 文脈(変更行の前後)を含めて 100 行より大きくてはいけない。
 - ただ一個のことだけを修正しているべき。
 - 皆を悩ませている本物のバグを修正しなければならない。("これはバグで
   あるかもしれないが..." のようなものではない)
 - ビルドエラー(CONFIG_BROKENになっているものを除く), oops, ハング、デー
   ã‚¿ç ´å£Šã€ç¾å®Ÿã®ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£å•é¡Œã€ãã®ä»– "ああ、これはダメだね"という
   ようなものを修正しなければならない。短く言えば、重大な問題。
 - どのように競合状態が発生するかの説明も一緒に書かれていない限り、
   "理論的には競合状態になる"ようなものは不可。
 - いかなる些細な修正も含めることはできない。(スペルの修正、空白のクリー
   ンアップなど)
 - 対応するサブシステムメンテナが受け入れたものでなければならない。
 - Documentation/SubmittingPatches の規則に従ったものでなければならない。

-stable ツリーにパッチを送付する手続き-

 - 上記の規則に従っているかを確認した後に、stable@kernel.org にパッチ
   を送る。
 - 送信者はパッチがキューに受け付けられた際には ACK ã‚’ã€å´ä¸‹ã•ã‚ŒãŸå ´åˆ
   には NAK を受け取る。この反応は開発者たちのスケジュールによって、数
   æ—¥ã‹ã‹ã‚‹å ´åˆãŒã‚ã‚‹ã€‚
 - もし受け取られたら、パッチは他の開発者たちのレビューのために
   -stable ã‚­ãƒ¥ãƒ¼ã«è¿½åŠ ã•ã‚Œã‚‹ã€‚
 - セキュリティパッチはこのエイリアス (stable@kernel.org) に送られるべ
   きではなく、代わりに security@kernel.org のアドレスに送られる。

レビューサイクル-

 - -stable メンテナがレビューサイクルを決めるとき、パッチはレビュー委
   å“¡ä¼šã¨ãƒ‘ãƒƒãƒãŒå½±éŸ¿ã™ã‚‹é ˜åŸŸã®ãƒ¡ãƒ³ãƒ†ãƒŠ(æä¾›è€…ãŒãã®é ˜åŸŸã®ãƒ¡ãƒ³ãƒ†ãƒŠã§ç„¡
   い限り)に送られ、linux-kernel メーリングリストにCCされる。
 - レビュー委員会は 48時間の間に ACK か NAK を出す。
 - もしパッチが委員会のメンバから却下れるか、メンテナ達やメンバが気付
   かなかった問題が持ちあがり、linux-kernel メンバがパッチに異議を唱え
   ãŸå ´åˆã«ã¯ã€ãƒ‘ãƒƒãƒã¯ã‚­ãƒ¥ãƒ¼ã‹ã‚‰å‰Šé™¤ã•ã‚Œã‚‹ã€‚
 - レビューサイクルの最後に、ACK を受けたパッチは最新の -stable リリー
   ã‚¹ã«è¿½åŠ ã•ã‚Œã€ãã®å¾Œã«æ–°ã—ã„ -stable リリースが行われる。
 - セキュリティパッチは、通常のレビューサイクルを通らず、セキュリティ
   カーネルチームから直接 -stable ツリーに受け付けられる。
   この手続きの詳細については kernel security チームに問い合わせること。

レビュー委員会-

 - この委員会は、このタスクについて活動する多くのボランティアと、少数の
   非ボランティアのカーネル開発者達で構成されている。
+13 −27
Original line number Diff line number Diff line
@@ -423,10 +423,8 @@ struct kset *devices_kset;
int device_create_file(struct device *dev, struct device_attribute *attr)
{
	int error = 0;
	if (get_device(dev)) {
	if (dev)
		error = sysfs_create_file(&dev->kobj, &attr->attr);
		put_device(dev);
	}
	return error;
}

@@ -437,10 +435,8 @@ int device_create_file(struct device *dev, struct device_attribute *attr)
 */
void device_remove_file(struct device *dev, struct device_attribute *attr)
{
	if (get_device(dev)) {
	if (dev)
		sysfs_remove_file(&dev->kobj, &attr->attr);
		put_device(dev);
	}
}

/**
@@ -1144,25 +1140,11 @@ struct device *device_create(struct class *class, struct device *parent,
}
EXPORT_SYMBOL_GPL(device_create);

/**
 * find_device - finds a device that was created with device_create()
 * @class: pointer to the struct class that this device was registered with
 * @devt: the dev_t of the device that was previously registered
 */
static struct device *find_device(struct class *class, dev_t devt)
static int __match_devt(struct device *dev, void *data)
{
	struct device *dev = NULL;
	struct device *dev_tmp;
	dev_t *devt = data;

	down(&class->sem);
	list_for_each_entry(dev_tmp, &class->devices, node) {
		if (dev_tmp->devt == devt) {
			dev = dev_tmp;
			break;
		}
	}
	up(&class->sem);
	return dev;
	return dev->devt == *devt;
}

/**
@@ -1177,10 +1159,12 @@ void device_destroy(struct class *class, dev_t devt)
{
	struct device *dev;

	dev = find_device(class, devt);
	if (dev)
	dev = class_find_device(class, &devt, __match_devt);
	if (dev) {
		put_device(dev);
		device_unregister(dev);
	}
}
EXPORT_SYMBOL_GPL(device_destroy);

#ifdef CONFIG_PM_SLEEP
@@ -1203,9 +1187,11 @@ void destroy_suspended_device(struct class *class, dev_t devt)
{
	struct device *dev;

	dev = find_device(class, devt);
	if (dev)
	dev = class_find_device(class, &devt, __match_devt);
	if (dev) {
		device_pm_schedule_removal(dev);
		put_device(dev);
	}
}
EXPORT_SYMBOL_GPL(destroy_suspended_device);
#endif /* CONFIG_PM_SLEEP */
+3 −6
Original line number Diff line number Diff line
@@ -97,10 +97,9 @@ int driver_create_file(struct device_driver *drv,
		       struct driver_attribute *attr)
{
	int error;
	if (get_driver(drv)) {
	if (drv)
		error = sysfs_create_file(&drv->p->kobj, &attr->attr);
		put_driver(drv);
	} else
	else
		error = -EINVAL;
	return error;
}
@@ -114,10 +113,8 @@ EXPORT_SYMBOL_GPL(driver_create_file);
void driver_remove_file(struct device_driver *drv,
			struct driver_attribute *attr)
{
	if (get_driver(drv)) {
	if (drv)
		sysfs_remove_file(&drv->p->kobj, &attr->attr);
		put_driver(drv);
	}
}
EXPORT_SYMBOL_GPL(driver_remove_file);

+1 −0
Original line number Diff line number Diff line
@@ -129,6 +129,7 @@ void device_pm_schedule_removal(struct device *dev)
	list_move_tail(&dev->power.entry, &dpm_destroy);
	mutex_unlock(&dpm_list_mtx);
}
EXPORT_SYMBOL_GPL(device_pm_schedule_removal);

/**
 *	pm_sleep_lock - mutual exclusion for registration and suspend
Loading