projects/linux·commit efefc6eb

Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6

efefc6eb · Linus Torvalds <[email protected]> · 2007-10-12 15:49:37 -07:00

* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6: (75 commits)
  PM: merge device power-management source files
  sysfs: add copyrights
  kobject: update the copyrights
  kset: add some kerneldoc to help describe what these strange things are
  Driver core: rename ktype_edd and ktype_efivar
  Driver core: rename ktype_driver
  Driver core: rename ktype_device
  Driver core: rename ktype_class
  driver core: remove subsystem_init()
  sysfs: move sysfs file poll implementation to sysfs_open_dirent
  sysfs: implement sysfs_open_dirent
  sysfs: move sysfs_dirent->s_children into sysfs_dirent->s_dir
  sysfs: make sysfs_root a regular directory dirent
  sysfs: open code sysfs_attach_dentry()
  sysfs: make s_elem an anonymous union
  sysfs: make bin attr open get active reference of parent too
  sysfs: kill unnecessary NULL pointer check in sysfs_release()
  sysfs: kill unnecessary sysfs_get() in open paths
  sysfs: reposition sysfs_dirent->s_mode.
  sysfs: kill sysfs_update_file()
  ...
Commit
efefc6eb38d43b8e5daef482f575d767b002004e
Parents
117494a1 · cd59abfc

Merge commit. Changes below are compared with the first parent: 117494a1.

Changes

114 files changed · +1777 −2493

FileStatusAddDelContent
Documentation/ja_JP/HOWTOmodified+45−39View file
Documentation/kernel-parameters.txtmodified+4−0View file
Documentation/kobject.txtmodified+2−20View file
arch/ia64/sn/kernel/tiocx.cmodified+1−2View file
arch/powerpc/kernel/of_device.cmodified+11−26View file
arch/powerpc/kernel/vio.cmodified+3−13View file
arch/powerpc/platforms/ps3/system-bus.cmodified+2−7View file
block/bsg.cmodified+1−4View file
block/elevator.cmodified+1−1View file
block/genhd.cmodified+8−27View file
block/ll_rw_blk.cmodified+1−1View file
drivers/acpi/bus.cmodified+1−1View file
drivers/acpi/scan.cmodified+9−7View file
drivers/acpi/video.cmodified+2−2View file
drivers/amba/bus.cmodified+3−6View file
drivers/base/Kconfigmodified+8−0View file
drivers/base/base.hmodified+0−2View file
drivers/base/bus.cmodified+74−42View file
drivers/base/class.cmodified+19−41View file
drivers/base/core.cmodified+32−76View file
drivers/base/firmware_class.cmodified+4−10View file
drivers/base/memory.cmodified+1−2View file
drivers/base/platform.cmodified+7−19View file
drivers/base/power/Makefilemodified+1−1View file
drivers/base/power/main.cmodified+340−4View file
drivers/base/power/power.hmodified+2−36View file
drivers/base/power/resume.cdeleted+0−149View before deletion
drivers/base/power/suspend.cdeleted+0−210View before deletion
drivers/base/sys.cmodified+15−58View file
drivers/char/dsp56k.cmodified+2−2View file
drivers/char/ip2/ip2main.cmodified+6−6View file
drivers/char/ipmi/ipmi_devintf.cmodified+3−3View file
drivers/char/istallion.cmodified+3−5View file
drivers/char/lp.cmodified+2−3View file
drivers/char/pcmcia/cm4000_cs.cmodified+2−3View file
drivers/char/pcmcia/cm4040_cs.cmodified+2−3View file
drivers/char/pty.cmodified+7−2View file
drivers/char/raw.cmodified+1−4View file
drivers/char/snsc.cmodified+1−2View file
drivers/char/stallion.cmodified+3−4View file
drivers/char/tipar.cmodified+3−3View file
drivers/char/viotape.cmodified+5−5View file
drivers/cpufreq/cpufreq.cmodified+1−1View file
drivers/edac/edac_mc_sysfs.cmodified+2−1View file
drivers/eisa/eisa-bus.cmodified+2−7View file
drivers/firewire/fw-device.cmodified+2−9View file
drivers/firmware/dmi-id.cmodified+38−24View file
drivers/firmware/edd.cmodified+2−2View file
drivers/firmware/efivars.cmodified+2−2View file
drivers/i2c/i2c-core.cmodified+2−6View file
drivers/ide/ide.cmodified+5−12View file
drivers/ieee1394/nodemgr.cmodified+4−13View file
drivers/infiniband/core/sysfs.cmodified+3−6View file
drivers/input/input.cmodified+20−42View file
drivers/input/misc/pcspkr.cmodified+1−0View file
drivers/input/serio/serio.cmodified+3−8View file
drivers/md/md.cmodified+1−2View file
drivers/media/dvb/dvb-core/dvbdev.cmodified+1−4View file
drivers/media/video/pvrusb2/pvrusb2-sysfs.cmodified+2−2View file
drivers/misc/tifm_core.cmodified+2−7View file
drivers/mmc/core/bus.cmodified+7−14View file
drivers/net/ibmveth.cmodified+1−1View file
drivers/pci/hotplug.cmodified+6−22View file
drivers/pci/hotplug/pci_hotplug_core.cmodified+0−60View file
drivers/pci/hotplug/rpadlpar_sysfs.cmodified+3−3View file
drivers/pci/pci-driver.cmodified+1−2View file
drivers/pci/pci.hmodified+1−2View file
drivers/pci/setup-irq.cmodified+1−1View file
drivers/pcmcia/cs.cmodified+3−7View file
drivers/pcmcia/ds.cmodified+6−20View file
drivers/pcmcia/pxa2xx_mainstone.cmodified+1−1View file
drivers/pcmcia/pxa2xx_sharpsl.cmodified+1−1View file
drivers/power/power_supply.hmodified+1−2View file
drivers/power/power_supply_sysfs.cmodified+5−12View file
drivers/s390/cio/ccwgroup.cmodified+1−2View file
drivers/s390/cio/device.cmodified+7−18View file
drivers/s390/crypto/ap_bus.cmodified+4−10View file
drivers/scsi/scsi_sysfs.cmodified+2−7View file
drivers/spi/spi.cmodified+2−5View file
drivers/usb/core/devio.cmodified+2−4View file
drivers/usb/core/driver.cmodified+7−22View file
drivers/usb/core/message.cmodified+7−21View file
drivers/video/output.cmodified+16−13View file
drivers/w1/w1.cmodified+7−12View file
fs/debugfs/file.cmodified+36−0View file
fs/dlm/lockspace.cmodified+1−1View file
fs/gfs2/locking/dlm/sysfs.cmodified+1−1View file
fs/gfs2/sys.cmodified+1−1View file
fs/ocfs2/cluster/masklog.cmodified+2−1View file
fs/partitions/check.cmodified+7−5View file
fs/sysfs/bin.cmodified+20−16View file
fs/sysfs/dir.cmodified+199−555View file
fs/sysfs/file.cmodified+170−78View file
fs/sysfs/group.cmodified+0−2View file
fs/sysfs/inode.cmodified+55−48View file
fs/sysfs/mount.cmodified+14−12View file
fs/sysfs/symlink.cmodified+18−16View file
fs/sysfs/sysfs.hmodified+111−73View file
include/asm-powerpc/of_device.hmodified+1−1View file
include/linux/debugfs.hmodified+27−0View file
include/linux/device.hmodified+5−12View file
include/linux/kobject.hmodified+45−80View file
include/linux/platform_device.hmodified+4−3View file
include/linux/sysfs.hmodified+55−92View file
include/linux/tty.hmodified+0−1View file
include/linux/video_output.hmodified+2−2View file
lib/Makefilemodified+2−1View file
lib/kobject.cmodified+49−86View file
lib/kobject_uevent.cmodified+112−104View file
net/atm/atm_sysfs.cmodified+2−5View file
net/bridge/br_sysfs_br.cmodified+1−1View file
net/core/net-sysfs.cmodified+4−10View file
net/wireless/sysfs.cmodified+1−2View file
sound/aoa/soundbus/core.cmodified+10−23View file

Only the first 600 diff lines are shown. Download the complete patch.

Documentation/ja_JP/HOWTO

View file
diff --git a/Documentation/ja_JP/HOWTO b/Documentation/ja_JP/HOWTO
index 9f08dab..d9d832c 100644
--- a/Documentation/ja_JP/HOWTO
+++ b/Documentation/ja_JP/HOWTO
@@ -1,4 +1,4 @@
-NOTE:
+NOTE:
This is a version of Documentation/HOWTO translated into Japanese.
This document is maintained by Tsugikazu Shibata <[email protected]>
and the JF Project team <www.linux.or.jp/JF>.
@@ -11,14 +11,14 @@ for non English (read: Japanese) speakers and is not intended as a
fork. So if you have any comments or updates for this file, please try
to update the original English file first.
-Last Updated: 2007/07/18
+Last Updated: 2007/09/23
==================================
これは、
-linux-2.6.22/Documentation/HOWTO
+linux-2.6.23/Documentation/HOWTO
の和訳です。
翻訳団体: JF プロジェクト < http://www.linux.or.jp/JF/ >
-翻訳日: 2007/07/16
+翻訳日: 2007/09/19
翻訳者: Tsugikazu Shibata <tshibata at ab dot jp dot nec dot com>
校正者: 松倉さん <nbh--mats at nifty dot com>
小林 雅典さん (Masanori Kobayasi) <zap03216 at nifty dot ne dot jp>
@@ -27,6 +27,7 @@ linux-2.6.22/Documentation/HOWTO
野口さん (Kenji Noguchi) <tokyo246 at gmail dot com>
河内さん (Takayoshi Kochi) <t-kochi at bq dot jp dot nec dot com>
岩本さん (iwamoto) <iwamoto.kn at ncos dot nec dot co dot jp>
+ 内田さん (Satoshi Uchida) <s-uchida at ap dot jp dot nec dot com>
==================================
Linux カーネル開発のやり方
@@ -40,7 +41,7 @@ Linux カーネル開発コミュニティと共に活動するやり方を学
手助けになります。
もし、このドキュメントのどこかが古くなっていた場合には、このドキュメン
-トの最後にリストしたメンテナーにパッチを送ってください。
+トの最後にリストしたメンテナにパッチを送ってください。
はじめに
---------
@@ -59,7 +60,7 @@ Linux カーネル開発コミュニティと共に活動するやり方を学
ネル開発者には必要です。アーキテクチャ向けの低レベル部分の開発をするの
でなければ、(どんなアーキテクチャでも)アセンブリ(訳注: 言語)は必要あり
ません。以下の本は、C 言語の十分な知識や何年もの経験に取って代わるもの
-ではありませんが、少なくともリファレンスとしてはいい本です。
+ではありませんが、少なくともリファレンスとしては良い本です。
- "The C Programming Language" by Kernighan and Ritchie [Prentice Hall]
-『プログラミング言語C第2版』(B.W. カーニハン/D.M. リッチー著 石田晴久訳) [共立出版]
- "Practical C Programming" by Steve Oualline [O'Reilly]
@@ -76,7 +77,7 @@ Linux カーネル開発コミュニティと共に活動するやり方を学
ときどき、カーネルがツールチェインや C 言語拡張に置いている前提がどう
なっているのかわかりにくいことがあり、また、残念なことに決定的なリファ
レンスは存在しません。情報を得るには、gcc の info ページ( info gcc )を
-みてください。
+見てください。
あなたは既存の開発コミュニティと一緒に作業する方法を学ぼうとしているこ
とに留意してください。そのコミュニティは、コーディング、スタイル、
@@ -92,7 +93,7 @@ Linux カーネル開発コミュニティと共に活動するやり方を学
Linux カーネルのソースコードは GPL ライセンスの下でリリースされていま
す。ライセンスの詳細については、ソースツリーのメインディレクトリに存在
-する、COPYING のファイルをみてください。もしライセンスについてさらに質
+する、COPYING のファイルを見てください。もしライセンスについてさらに質
問があれば、Linux Kernel メーリングリストに質問するのではなく、どうぞ
法律家に相談してください。メーリングリストの人達は法律家ではなく、法的
問題については彼らの声明はあてにするべきではありません。
@@ -109,7 +110,8 @@ Linux カーネルソースツリーは幅広い範囲のドキュメントを
新しいドキュメントファイルも追加することを勧めます。
カーネルの変更が、カーネルがユーザ空間に公開しているインターフェイスの
変更を引き起こす場合、その変更を説明するマニュアルページのパッチや情報
-をマニュアルページのメンテナ [email protected] に送ることを勧めます。
+をマニュアルページのメンテナ [email protected] に送ることを勧めま
+す。
以下はカーネルソースツリーに含まれている読んでおくべきファイルの一覧で
す-
@@ -117,7 +119,7 @@ Linux カーネルソースツリーは幅広い範囲のドキュメントを
README
このファイルは Linuxカーネルの簡単な背景とカーネルを設定(訳注
configure )し、生成(訳注 build )するために必要なことは何かが書かれ
- ています。カーネルに関して初めての人はここからスタートするとよいで
+ ています。カーネルに関して初めての人はここからスタートすると良いで
しょう。
Documentation/Changes
@@ -128,7 +130,7 @@ Linux カーネルソースツリーは幅広い範囲のドキュメントを
Documentation/CodingStyle
これは Linux カーネルのコーディングスタイルと背景にある理由を記述
しています。全ての新しいコードはこのドキュメントにあるガイドライン
- に従っていることを期待されています。大部分のメンテナーはこれらのルー
+ に従っていることを期待されています。大部分のメンテナはこれらのルー
ルに従っているものだけを受け付け、多くの人は正しいスタイルのコード
だけをレビューします。
@@ -168,16 +170,16 @@ Linux カーネルソースツリーは幅広い範囲のドキュメントを
支援してください。
Documentation/ManagementStyle
- このドキュメントは Linux カーネルのメンテナー達がどう行動するか、
+ このドキュメントは Linux カーネルのメンテナ達がどう行動するか、
彼らの手法の背景にある共有されている精神について記述しています。こ
れはカーネル開発の初心者なら(もしくは、単に興味があるだけの人でも)
- 重要です。なぜならこのドキュメントは、カーネルメンテナー達の独特な
+ 重要です。なぜならこのドキュメントは、カーネルメンテナ達の独特な
行動についての多くの誤解や混乱を解消するからです。
Documentation/stable_kernel_rules.txt
このファイルはどのように stable カーネルのリリースが行われるかのルー
ルが記述されています。そしてこれらのリリースの中のどこかで変更を取
- り入れてもらいたい場合に何をすればいいかが示されています。
+ り入れてもらいたい場合に何をすれば良いかが示されています。
Documentation/kernel-docs.txt
  カーネル開発に付随する外部ドキュメントのリストです。もしあなたが
@@ -218,9 +220,9 @@ web サイトには、コードの構成、サブシステム、現在存在す
ここには、また、カーネルのコンパイルのやり方やパッチの当て方などの間接
的な基本情報も記述されています。
-あなたがどこからスタートしてよいかわからないが、Linux カーネル開発コミュ
+あなたがどこからスタートして良いかわからないが、Linux カーネル開発コミュ
ニティに参加して何かすることをさがしている場合には、Linux kernel
-Janitor's プロジェクトにいけばよいでしょう -
+Janitor's プロジェクトにいけば良いでしょう -
http://janitor.kernelnewbies.org/
ここはそのようなスタートをするのにうってつけの場所です。ここには、
Linux カーネルソースツリーの中に含まれる、きれいにし、修正しなければな
@@ -243,7 +245,7 @@ Linux カーネルソースツリーの中に含まれる、きれいにし、
自己参照方式で、索引がついた web 形式で、ソースコードを参照することが
できます。この最新の素晴しいカーネルコードのリポジトリは以下で見つかり
ます-
- http://sosdg.org/~coywolf/lxr/
+ http://sosdg.org/~qiyong/lxr/
開発プロセス
-----------------------
@@ -265,9 +267,9 @@ Linux カーネルの開発プロセスは現在幾つかの異なるメイン
以下のとおり-
- 新しいカーネルがリリースされた直後に、2週間の特別期間が設けられ、
- この期間中に、メンテナー達は Linus に大きな差分を送ることができま
- す。このような差分は通常 -mm カーネルに数週間含まれてきたパッチで
- す。 大きな変更は git(カーネルのソース管理ツール、詳細は
+ この期間中に、メンテナ達は Linus に大きな差分を送ることができます。
+ このような差分は通常 -mm カーネルに数週間含まれてきたパッチです。
+ 大きな変更は git(カーネルのソース管理ツール、詳細は
http://git.or.cz/ 参照) を使って送るのが好ましいやり方ですが、パッ
チファイルの形式のまま送るのでも十分です。
@@ -285,6 +287,10 @@ Linux カーネルの開発プロセスは現在幾つかの異なるメイン
に安定した状態にあると判断したときにリリースされます。目標は毎週新
しい -rc カーネルをリリースすることです。
+ - 以下の URL で各 -rc リリースに存在する既知の後戻り問題のリスト
+ が追跡されます-
+ http://kernelnewbies.org/known_regressions
+
- このプロセスはカーネルが 「準備ができた」と考えられるまで継続しま
す。このプロセスはだいたい 6週間継続します。
@@ -331,8 +337,8 @@ Andrew は個別のサブシステムカーネルツリーとパッチを全て
linux-kernel メーリングリストで収集された多数のパッチと同時に一つにま
とめます。
このツリーは新機能とパッチが検証される場となります。ある期間の間パッチ
-が -mm に入って価値を証明されたら、Andrew やサブシステムメンテナが、メ
-インラインへ入れるように Linus にプッシュします。
+が -mm に入って価値を証明されたら、Andrew やサブシステムメンテナが、
+メインラインへ入れるように Linus にプッシュします。
メインカーネルツリーに含めるために Linus に送る前に、すべての新しいパッ
チが -mm ツリーでテストされることが強く推奨されます。
@@ -460,7 +466,7 @@ MAINTAINERS ファイルにリストがありますので参照してくださ
せん-
彼らはあなたのパッチの行毎にコメントを入れたいので、そのためにはそうす
るしかありません。あなたのメールプログラムが空白やタブを圧縮しないよう
-に確認した方がいいです。最初の良いテストとしては、自分にメールを送って
+に確認した方が良いです。最初の良いテストとしては、自分にメールを送って
みて、そのパッチを自分で当ててみることです。もしそれがうまく行かないな
ら、あなたのメールプログラムを直してもらうか、正しく動くように変えるべ
きです。
@@ -507,14 +513,14 @@ MAINTAINERS ファイルにリストがありますので参照してくださ
とも普通のことです。これはあなたのパッチが受け入れられないということで
は *ありません*、そしてあなた自身に反対することを意味するのでも *ありま
せん*。単に自分のパッチに対して指摘された問題を全て修正して再送すれば
-いいのです。
+良いのです。
カーネルコミュニティと企業組織のちがい
-----------------------------------------------------------------
カーネルコミュニティは大部分の伝統的な会社の開発環境とは異ったやり方で
-動いています。以下は問題を避けるためにできるとよいことののリストです-
+動いています。以下は問題を避けるためにできると良いことのリストです-
あなたの提案する変更について言うときのうまい言い方:
@@ -525,7 +531,7 @@ MAINTAINERS ファイルにリストがありますので参照してくださ
- "以下は一連の小さなパッチ群ですが..."
- "これは典型的なマシンでの性能を向上させます.."
- やめた方がいい悪い言い方:
+ やめた方が良い悪い言い方:
- このやり方で AIX/ptx/Solaris ではできたので、できるはずだ
- 私はこれを20年もの間やってきた、だから
@@ -575,10 +581,10 @@ Linux カーネルコミュニティは、一度に大量のコードの塊を
1) 小さいパッチはあなたのパッチが適用される見込みを大きくします、カー
ネルの人達はパッチが正しいかどうかを確認する時間や労力をかけないか
- らです。5行のパッチはメンテナがたった1秒見るだけで適用できます。し
- かし、500行のパッチは、正しいことをレビューするのに数時間かかるかも
- しれません(時間はパッチのサイズなどにより指数関数に比例してかかりま
- す)
+ らです。5行のパッチはメンテナがたった1秒見るだけで適用できます。
+ しかし、500行のパッチは、正しいことをレビューするのに数時間かかるか
+ もしれません(時間はパッチのサイズなどにより指数関数に比例してかかり
+ ます)
小さいパッチは何かあったときにデバッグもとても簡単になります。パッ
チを1個1個取り除くのは、とても大きなパッチを当てた後に(かつ、何かお
@@ -587,23 +593,23 @@ Linux カーネルコミュニティは、一度に大量のコードの塊を
2) 小さいパッチを送るだけでなく、送るまえに、書き直して、シンプルにす
る(もしくは、単に順番を変えるだけでも)ことも、とても重要です。
-以下はカーネル開発者の Al Viro のたとえ話しです:
+以下はカーネル開発者の Al Viro のたとえ話です:
"生徒の数学の宿題を採点する先生のことを考えてみてください、先
- 生は生徒が解に到達するまでの試行錯誤をみたいとは思わないでしょ
- う。先生は簡潔な最高の解をみたいのです。良い生徒はこれを知って
+ 生は生徒が解に到達するまでの試行錯誤を見たいとは思わないでしょ
+ う。先生は簡潔な最高の解を見たいのです。良い生徒はこれを知って
おり、そして最終解の前の中間作業を提出することは決してないので
す"
- カーネル開発でもこれは同じです。メンテナー達とレビューア達は、
- 問題を解決する解の背後になる思考プロセスをみたいとは思いません。
- 彼らは単純であざやかな解決方法をみたいのです。
+ カーネル開発でもこれは同じです。メンテナ達とレビューア達は、
+ 問題を解決する解の背後になる思考プロセスを見たいとは思いません。
+ 彼らは単純であざやかな解決方法を見たいのです。
あざやかな解を説明するのと、コミュニティと共に仕事をし、未解決の仕事を
議論することのバランスをキープするのは難しいかもしれません。
ですから、開発プロセスの早期段階で改善のためのフィードバックをもらうよ
-うにするのもいいですが、変更点を小さい部分に分割して全体ではまだ完成し
-ていない仕事を(部分的に)取り込んでもらえるようにすることもいいことです。
+うにするのも良いですが、変更点を小さい部分に分割して全体ではまだ完成し
+ていない仕事を(部分的に)取り込んでもらえるようにすることも良いことです。
また、でき上がっていないものや、"将来直す" ようなパッチを、本流に含め
てもらうように送っても、それは受け付けられないことを理解してください。
@@ -629,7 +635,7 @@ Linux カーネルコミュニティは、一度に大量のコードの塊を
- テスト結果
これについて全てがどのようにあるべきかについての詳細は、以下のドキュメ
-ントの ChangeLog セクションをみてください-
+ントの ChangeLog セクションを見てください-
"The Perfect Patch"
http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt

Documentation/kernel-parameters.txt

View file
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index f27cdd7..912c57c 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -1437,6 +1437,10 @@ and is between 256 and 4096 characters. It is defined in the file
pt. [PARIDE]
See Documentation/paride.txt.
+ pty.legacy_count=
+ [KNL] Number of legacy pty's. Overwrites compiled-in
+ default number.
+
quiet [KNL] Disable most log messages
r128= [HW,DRM]

Documentation/kobject.txt

View file
diff --git a/Documentation/kobject.txt b/Documentation/kobject.txt
index 8ee49ee..ca86a88 100644
--- a/Documentation/kobject.txt
+++ b/Documentation/kobject.txt
@@ -54,7 +54,6 @@ embedded in larger data structures and replace fields they duplicate.
struct kobject {
const char * k_name;
- char name[KOBJ_NAME_LEN];
struct kref kref;
struct list_head entry;
struct kobject * parent;
@@ -223,18 +222,15 @@ decl_subsys(devices, &ktype_device, &device_uevent_ops);
is equivalent to doing:
struct kset devices_subsys = {
- .kobj = {
- .name = "devices",
- },
.ktype = &ktype_devices,
.uevent_ops = &device_uevent_ops,
};
-
+kobject_set_name(&devices_subsys, name);
The objects that are registered with a subsystem that use the
subsystem's default list must have their kset ptr set properly. These
objects may have embedded kobjects or ksets. The
-following helpers make setting the kset easier:
+following helper makes setting the kset easier:
kobj_set_kset_s(obj,subsys)
@@ -242,22 +238,8 @@ kobj_set_kset_s(obj,subsys)
- Assumes that obj->kobj exists, and is a struct kobject.
- Sets the kset of that kobject to the kset <subsys>.
-
-kset_set_kset_s(obj,subsys)
-
-- Assumes that obj->kset exists, and is a struct kset.
-- Sets the kset of the embedded kobject to the kset <subsys>.
-
-subsys_set_kset(obj,subsys)
-
-- Assumes obj->subsys exists, and is a struct subsystem.
-- Sets obj->subsys.kset.kobj.kset to the subsystem's embedded kset.
-
-void subsystem_init(struct kset *s);
int subsystem_register(struct kset *s);
void subsystem_unregister(struct kset *s);
-struct kset *subsys_get(struct kset *s);
-void kset_put(struct kset *s);
These are just wrappers around the respective kset_* functions.

arch/ia64/sn/kernel/tiocx.c

View file
diff --git a/arch/ia64/sn/kernel/tiocx.c b/arch/ia64/sn/kernel/tiocx.c
index 5a289e4..a88eba3 100644
--- a/arch/ia64/sn/kernel/tiocx.c
+++ b/arch/ia64/sn/kernel/tiocx.c
@@ -66,8 +66,7 @@ static int tiocx_match(struct device *dev, struct device_driver *drv)
}
-static int tiocx_uevent(struct device *dev, char **envp, int num_envp,
- char *buffer, int buffer_size)
+static int tiocx_uevent(struct device *dev, struct kobj_uevent_env *env)
{
return -ENODEV;
}

arch/powerpc/kernel/of_device.c

View file
diff --git a/arch/powerpc/kernel/of_device.c b/arch/powerpc/kernel/of_device.c
index 89b911e..8f3db32 100644
--- a/arch/powerpc/kernel/of_device.c
+++ b/arch/powerpc/kernel/of_device.c
@@ -57,26 +57,21 @@ ssize_t of_device_get_modalias(struct of_device *ofdev,
return tsize;
}
-int of_device_uevent(struct device *dev,
- char **envp, int num_envp, char *buffer, int buffer_size)
+int of_device_uevent(struct device *dev, struct kobj_uevent_env *env)
{
struct of_device *ofdev;
const char *compat;
- int i = 0, length = 0, seen = 0, cplen, sl;
+ int seen = 0, cplen, sl;
if (!dev)
return -ENODEV;
ofdev = to_of_device(dev);
- if (add_uevent_var(envp, num_envp, &i,
- buffer, buffer_size, &length,
- "OF_NAME=%s", ofdev->node->name))
+ if (add_uevent_var(env, "OF_NAME=%s", ofdev->node->name))
return -ENOMEM;
- if (add_uevent_var(envp, num_envp, &i,
- buffer, buffer_size, &length,
- "OF_TYPE=%s", ofdev->node->type))
+ if (add_uevent_var(env, "OF_TYPE=%s", ofdev->node->type))
return -ENOMEM;
/* Since the compatible field can contain pretty much anything
@@ -85,9 +80,7 @@ int of_device_uevent(struct device *dev,
compat = of_get_property(ofdev->node, "compatible", &cplen);
while (compat && *compat && cplen > 0) {
- if (add_uevent_var(envp, num_envp, &i,
- buffer, buffer_size, &length,
- "OF_COMPATIBLE_%d=%s", seen, compat))
+ if (add_uevent_var(env, "OF_COMPATIBLE_%d=%s", seen, compat))
return -ENOMEM;
sl = strlen (compat) + 1;
@@ -96,25 +89,17 @@ int of_device_uevent(struct device *dev,
seen++;
}
- if (add_uevent_var(envp, num_envp, &i,
- buffer, buffer_size, &length,
- "OF_COMPATIBLE_N=%d", seen))
+ if (add_uevent_var(env, "OF_COMPATIBLE_N=%d", seen))
return -ENOMEM;
/* modalias is trickier, we add it in 2 steps */
- if (add_uevent_var(envp, num_envp, &i,
- buffer, buffer_size, &length,
- "MODALIAS="))
+ if (add_uevent_var(env, "MODALIAS="))
return -ENOMEM;
-
- sl = of_device_get_modalias(ofdev, &buffer[length-1],
- buffer_size-length);
- if (sl >= (buffer_size-length))
+ sl = of_device_get_modalias(ofdev, &env->buf[env->buflen-1],
+ sizeof(env->buf) - env->buflen);
+ if (sl >= (sizeof(env->buf) - env->buflen))
return -ENOMEM;
-
- length += sl;
-
- envp[i] = NULL;
+ env->buflen += sl;
return 0;
}

arch/powerpc/kernel/vio.c

View file
diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c
index cb22a35..19a5656 100644
--- a/arch/powerpc/kernel/vio.c
+++ b/arch/powerpc/kernel/vio.c
@@ -317,30 +317,20 @@ static int vio_bus_match(struct device *dev, struct device_driver *drv)
return (ids != NULL) && (vio_match_device(ids, vio_dev) != NULL);
}
-static int vio_hotplug(struct device *dev, char **envp, int num_envp,
- char *buffer, int buffer_size)
+static int vio_hotplug(struct device *dev, struct kobj_uevent_env *env)
{
const struct vio_dev *vio_dev = to_vio_dev(dev);
struct device_node *dn;
const char *cp;
- int length;
-
- if (!num_envp)
- return -ENOMEM;
dn = dev->archdata.of_node;
if (!dn)
return -ENODEV;
- cp = of_get_property(dn, "compatible", &length);
+ cp = of_get_property(dn, "compatible", NULL);
if (!cp)
return -ENODEV;
- envp[0] = buffer;
- length = scnprintf(buffer, buffer_size, "MODALIAS=vio:T%sS%s",
- vio_dev->type, cp);
- if ((buffer_size - length) <= 0)
- return -ENOMEM;
- envp[1] = NULL;
+ add_uevent_var(env, "MODALIAS=vio:T%sS%s", vio_dev->type, cp);
return 0;
}

arch/powerpc/platforms/ps3/system-bus.c

View file
diff --git a/arch/powerpc/platforms/ps3/system-bus.c b/arch/powerpc/platforms/ps3/system-bus.c
index 4bb634a..ea0b2c7 100644
--- a/arch/powerpc/platforms/ps3/system-bus.c
+++ b/arch/powerpc/platforms/ps3/system-bus.c
@@ -437,18 +437,13 @@ static void ps3_system_bus_shutdown(struct device *_dev)
dev_dbg(&dev->core, " <- %s:%d\n", __func__, __LINE__);
}
-static int ps3_system_bus_uevent(struct device *_dev, char **envp,
- int num_envp, char *buffer, int buffer_size)
+static int ps3_system_bus_uevent(struct device *_dev, struct kobj_uevent_env *env)
{
struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev);
int i = 0, length = 0;
- if (add_uevent_var(envp, num_envp, &i, buffer, buffer_size,
- &length, "MODALIAS=ps3:%d",
- dev->match_id))
+ if (add_uevent_var(env, "MODALIAS=ps3:%d", dev->match_id))
return -ENOMEM;
-
- envp[i] = NULL;
return 0;
}

block/bsg.c

View file
diff --git a/block/bsg.c b/block/bsg.c
index ed26468..b8ddfc6 100644
--- a/block/bsg.c
+++ b/block/bsg.c
@@ -1010,10 +1010,7 @@ unlock:
}
EXPORT_SYMBOL_GPL(bsg_register_queue);
-static struct cdev bsg_cdev = {
- .kobj = {.name = "bsg", },
- .owner = THIS_MODULE,
-};
+static struct cdev bsg_cdev;
static int __init bsg_init(void)
{

block/elevator.c

View file
diff --git a/block/elevator.c b/block/elevator.c
index c6d153d..b9c518a 100644
--- a/block/elevator.c
+++ b/block/elevator.c
@@ -186,7 +186,7 @@ static elevator_t *elevator_alloc(struct request_queue *q,
eq->ops = &e->ops;
eq->elevator_type = e;
kobject_init(&eq->kobj);
- snprintf(eq->kobj.name, KOBJ_NAME_LEN, "%s", "iosched");
+ kobject_set_name(&eq->kobj, "%s", "iosched");
eq->kobj.ktype = &elv_ktype;
mutex_init(&eq->sysfs_lock);

block/genhd.c

View file
diff --git a/block/genhd.c b/block/genhd.c
index 3af1e7a..e609996 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -540,61 +540,42 @@ static int block_uevent_filter(struct kset *kset, struct kobject *kobj)
return ((ktype == &ktype_block) || (ktype == &ktype_part));
}
-static int block_uevent(struct kset *kset, struct kobject *kobj, char **envp,
- int num_envp, char *buffer, int buffer_size)
+static int block_uevent(struct kset *kset, struct kobject *kobj,
+ struct kobj_uevent_env *env)
{
struct kobj_type *ktype = get_ktype(kobj);
struct device *physdev;
struct gendisk *disk;
struct hd_struct *part;
- int length = 0;
- int i = 0;
if (ktype == &ktype_block) {
disk = container_of(kobj, struct gendisk, kobj);
- add_uevent_var(envp, num_envp, &i, buffer, buffer_size,
- &length, "MINOR=%u", disk->first_minor);
+ add_uevent_var(env, "MINOR=%u", disk->first_minor);
} else if (ktype == &ktype_part) {
disk = container_of(kobj->parent, struct gendisk, kobj);
part = container_of(kobj, struct hd_struct, kobj);
- add_uevent_var(envp, num_envp, &i, buffer, buffer_size,
- &length, "MINOR=%u",
+ add_uevent_var(env, "MINOR=%u",
disk->first_minor + part->partno);
} else
return 0;
- add_uevent_var(envp, num_envp, &i, buffer, buffer_size, &length,
- "MAJOR=%u", disk->major);
+ add_uevent_var(env, "MAJOR=%u", disk->major);
/* add physical device, backing this device */
physdev = disk->driverfs_dev;
if (physdev) {
char *path = kobject_get_path(&physdev->kobj, GFP_KERNEL);
- add_uevent_var(envp, num_envp, &i, buffer, buffer_size,
- &length, "PHYSDEVPATH=%s", path);
+ add_uevent_var(env, "PHYSDEVPATH=%s", path);
kfree(path);
if (physdev->bus)
- add_uevent_var(envp, num_envp, &i,
- buffer, buffer_size, &length,
- "PHYSDEVBUS=%s",
- physdev->bus->name);
+ add_uevent_var(env, "PHYSDEVBUS=%s", physdev->bus->name);
if (physdev->driver)
- add_uevent_var(envp, num_envp, &i,
- buffer, buffer_size, &length,
- "PHYSDEVDRIVER=%s",
- physdev->driver->name);
+ add_uevent_var(env, physdev->driver->name);
}
- /* terminate, set to next free slot, shrink available space */
- envp[i] = NULL;
- envp = &envp[i];
- num_envp -= i;
- buffer = &buffer[length];
- buffer_size -= length;
-
return 0;
}

block/ll_rw_blk.c

View file
diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c
index cd9d2c5..d875673 100644
--- a/block/ll_rw_blk.c
+++ b/block/ll_rw_blk.c

This diff is incomplete. Download the complete patch.

drivers/acpi/bus.c

View file

This diff is incomplete. Download the complete patch.

drivers/acpi/scan.c

View file

This diff is incomplete. Download the complete patch.

drivers/acpi/video.c

View file

This diff is incomplete. Download the complete patch.

drivers/amba/bus.c

View file

This diff is incomplete. Download the complete patch.

drivers/base/Kconfig

View file

This diff is incomplete. Download the complete patch.

drivers/base/base.h

View file

This diff is incomplete. Download the complete patch.

drivers/base/bus.c

View file

This diff is incomplete. Download the complete patch.

drivers/base/class.c

View file

This diff is incomplete. Download the complete patch.

drivers/base/core.c

View file

This diff is incomplete. Download the complete patch.

drivers/base/firmware_class.c

View file

This diff is incomplete. Download the complete patch.

drivers/base/memory.c

View file

This diff is incomplete. Download the complete patch.

drivers/base/platform.c

View file

This diff is incomplete. Download the complete patch.

drivers/base/power/Makefile

View file

This diff is incomplete. Download the complete patch.

drivers/base/power/main.c

View file

This diff is incomplete. Download the complete patch.

drivers/base/power/power.h

View file

This diff is incomplete. Download the complete patch.

drivers/base/power/resume.c

View before deletion

This diff is incomplete. Download the complete patch.

drivers/base/power/suspend.c

View before deletion

This diff is incomplete. Download the complete patch.

drivers/base/sys.c

View file

This diff is incomplete. Download the complete patch.

drivers/char/dsp56k.c

View file

This diff is incomplete. Download the complete patch.

drivers/char/ip2/ip2main.c

View file

This diff is incomplete. Download the complete patch.

drivers/char/ipmi/ipmi_devintf.c

View file

This diff is incomplete. Download the complete patch.

drivers/char/istallion.c

View file

This diff is incomplete. Download the complete patch.

drivers/char/lp.c

View file

This diff is incomplete. Download the complete patch.

drivers/char/pcmcia/cm4000_cs.c

View file

This diff is incomplete. Download the complete patch.

drivers/char/pcmcia/cm4040_cs.c

View file

This diff is incomplete. Download the complete patch.

drivers/char/pty.c

View file

This diff is incomplete. Download the complete patch.

drivers/char/raw.c

View file

This diff is incomplete. Download the complete patch.

drivers/char/snsc.c

View file

This diff is incomplete. Download the complete patch.

drivers/char/stallion.c

View file

This diff is incomplete. Download the complete patch.

drivers/char/tipar.c

View file

This diff is incomplete. Download the complete patch.

drivers/char/viotape.c

View file

This diff is incomplete. Download the complete patch.

drivers/cpufreq/cpufreq.c

View file

This diff is incomplete. Download the complete patch.

drivers/edac/edac_mc_sysfs.c

View file

This diff is incomplete. Download the complete patch.

drivers/eisa/eisa-bus.c

View file

This diff is incomplete. Download the complete patch.

drivers/firewire/fw-device.c

View file

This diff is incomplete. Download the complete patch.

drivers/firmware/dmi-id.c

View file

This diff is incomplete. Download the complete patch.

drivers/firmware/edd.c

View file

This diff is incomplete. Download the complete patch.

drivers/firmware/efivars.c

View file

This diff is incomplete. Download the complete patch.

drivers/i2c/i2c-core.c

View file

This diff is incomplete. Download the complete patch.

drivers/ide/ide.c

View file

This diff is incomplete. Download the complete patch.

drivers/ieee1394/nodemgr.c

View file

This diff is incomplete. Download the complete patch.

drivers/infiniband/core/sysfs.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/input.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/misc/pcspkr.c

View file

This diff is incomplete. Download the complete patch.

drivers/input/serio/serio.c

View file

This diff is incomplete. Download the complete patch.

drivers/md/md.c

View file

This diff is incomplete. Download the complete patch.

drivers/media/dvb/dvb-core/dvbdev.c

View file

This diff is incomplete. Download the complete patch.

drivers/media/video/pvrusb2/pvrusb2-sysfs.c

View file

This diff is incomplete. Download the complete patch.

drivers/misc/tifm_core.c

View file

This diff is incomplete. Download the complete patch.

drivers/mmc/core/bus.c

View file

This diff is incomplete. Download the complete patch.

drivers/net/ibmveth.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/hotplug.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/hotplug/pci_hotplug_core.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/hotplug/rpadlpar_sysfs.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/pci-driver.c

View file

This diff is incomplete. Download the complete patch.

drivers/pci/pci.h

View file

This diff is incomplete. Download the complete patch.

drivers/pci/setup-irq.c

View file

This diff is incomplete. Download the complete patch.

drivers/pcmcia/cs.c

View file

This diff is incomplete. Download the complete patch.

drivers/pcmcia/ds.c

View file

This diff is incomplete. Download the complete patch.

drivers/pcmcia/pxa2xx_mainstone.c

View file

This diff is incomplete. Download the complete patch.

drivers/pcmcia/pxa2xx_sharpsl.c

View file

This diff is incomplete. Download the complete patch.

drivers/power/power_supply.h

View file

This diff is incomplete. Download the complete patch.

drivers/power/power_supply_sysfs.c

View file

This diff is incomplete. Download the complete patch.

drivers/s390/cio/ccwgroup.c

View file

This diff is incomplete. Download the complete patch.

drivers/s390/cio/device.c

View file

This diff is incomplete. Download the complete patch.

drivers/s390/crypto/ap_bus.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/scsi_sysfs.c

View file

This diff is incomplete. Download the complete patch.

drivers/spi/spi.c

View file

This diff is incomplete. Download the complete patch.

drivers/usb/core/devio.c

View file

This diff is incomplete. Download the complete patch.

drivers/usb/core/driver.c

View file

This diff is incomplete. Download the complete patch.

drivers/usb/core/message.c

View file

This diff is incomplete. Download the complete patch.

drivers/video/output.c

View file

This diff is incomplete. Download the complete patch.

drivers/w1/w1.c

View file

This diff is incomplete. Download the complete patch.

fs/debugfs/file.c

View file

This diff is incomplete. Download the complete patch.

fs/dlm/lockspace.c

View file

This diff is incomplete. Download the complete patch.

fs/gfs2/locking/dlm/sysfs.c

View file

This diff is incomplete. Download the complete patch.

fs/gfs2/sys.c

View file

This diff is incomplete. Download the complete patch.

fs/ocfs2/cluster/masklog.c

View file

This diff is incomplete. Download the complete patch.

fs/partitions/check.c

View file

This diff is incomplete. Download the complete patch.

fs/sysfs/bin.c

View file

This diff is incomplete. Download the complete patch.

fs/sysfs/dir.c

View file

This diff is incomplete. Download the complete patch.

fs/sysfs/file.c

View file

This diff is incomplete. Download the complete patch.

fs/sysfs/group.c

View file

This diff is incomplete. Download the complete patch.

fs/sysfs/inode.c

View file

This diff is incomplete. Download the complete patch.

fs/sysfs/mount.c

View file

This diff is incomplete. Download the complete patch.

fs/sysfs/symlink.c

View file

This diff is incomplete. Download the complete patch.

fs/sysfs/sysfs.h

View file

This diff is incomplete. Download the complete patch.

include/asm-powerpc/of_device.h

View file

This diff is incomplete. Download the complete patch.

include/linux/debugfs.h

View file

This diff is incomplete. Download the complete patch.

include/linux/device.h

View file

This diff is incomplete. Download the complete patch.

include/linux/kobject.h

View file

This diff is incomplete. Download the complete patch.

include/linux/platform_device.h

View file

This diff is incomplete. Download the complete patch.

include/linux/sysfs.h

View file

This diff is incomplete. Download the complete patch.

include/linux/tty.h

View file

This diff is incomplete. Download the complete patch.

include/linux/video_output.h

View file

This diff is incomplete. Download the complete patch.

lib/Makefile

View file

This diff is incomplete. Download the complete patch.

lib/kobject.c

View file

This diff is incomplete. Download the complete patch.

lib/kobject_uevent.c

View file

This diff is incomplete. Download the complete patch.

net/atm/atm_sysfs.c

View file

This diff is incomplete. Download the complete patch.

net/bridge/br_sysfs_br.c

View file

This diff is incomplete. Download the complete patch.

net/core/net-sysfs.c

View file

This diff is incomplete. Download the complete patch.

net/wireless/sysfs.c

View file

This diff is incomplete. Download the complete patch.

sound/aoa/soundbus/core.c

View file

This diff is incomplete. Download the complete patch.