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

* 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.

+167 -152
+3 -3
Documentation/driver-model/platform.txt
··· 122 122 using these calls except with such hotplug-deficient drivers. 123 123 124 124 struct platform_device *platform_device_alloc( 125 - char *name, unsigned id); 125 + const char *name, int id); 126 126 127 127 You can use platform_device_alloc() to dynamically allocate a device, which 128 128 you will then initialize with resources and platform_device_register(). 129 129 A better solution is usually: 130 130 131 131 struct platform_device *platform_device_register_simple( 132 - char *name, unsigned id, 133 - struct resource *res, unsigned nres); 132 + const char *name, int id, 133 + struct resource *res, unsigned int nres); 134 134 135 135 You can use platform_device_register_simple() as a one-step call to allocate 136 136 and register a device.
+79
Documentation/ja_JP/stable_kernel_rules.txt
··· 1 + NOTE: 2 + This is Japanese translated version of "Documentation/stable_kernel_rules.txt". 3 + This one is maintained by Tsugikazu Shibata <tshibata@ab.jp.nec.com> 4 + and JF Project team <www.linux.or.jp/JF>. 5 + If you find difference with original file or problem in translation, 6 + please contact maintainer of this file or JF project. 7 + 8 + Please also note that purpose of this file is easier to read for non 9 + English natives and do no intended to fork. So, if you have any 10 + comment or update of this file, please try to update Original(English) 11 + file at first. 12 + 13 + ================================== 14 + これは、 15 + linux-2.6.24/Documentation/stable_kernel_rules.txt 16 + の和訳です。 17 + 18 + 翻訳団体: JF プロジェクト < http://www.linux.or.jp/JF/ > 19 + 翻訳日: 2007/12/30 20 + 翻訳者: Tsugikazu Shibata <tshibata at ab dot jp dot nec dot com> 21 + 校正者: 武井伸光さん、<takei at webmasters dot gr dot jp> 22 + かねこさん (Seiji Kaneko) <skaneko at a2 dot mbn dot or dot jp> 23 + 小林 雅典さん (Masanori Kobayasi) <zap03216 at nifty dot ne dot jp> 24 + 野口さん (Kenji Noguchi) <tokyo246 at gmail dot com> 25 + 神宮信太郎さん <jin at libjingu dot jp> 26 + ================================== 27 + 28 + ずっと知りたかった Linux 2.6 -stable リリースの全て 29 + 30 + "-stable" ツリーにどのような種類のパッチが受け入れられるか、どのような 31 + ものが受け入れられないか、についての規則- 32 + 33 + - 明らかに正しく、テストされているものでなければならない。 34 + - 文脈(変更行の前後)を含めて 100 行より大きくてはいけない。 35 + - ただ一個のことだけを修正しているべき。 36 + - 皆を悩ませている本物のバグを修正しなければならない。("これはバグで 37 + あるかもしれないが..." のようなものではない) 38 + - ビルドエラー(CONFIG_BROKENになっているものを除く), oops, ハング、デー 39 + タ破壊、現実のセキュリティ問題、その他 "ああ、これはダメだね"という 40 + ようなものを修正しなければならない。短く言えば、重大な問題。 41 + - どのように競合状態が発生するかの説明も一緒に書かれていない限り、 42 + "理論的には競合状態になる"ようなものは不可。 43 + - いかなる些細な修正も含めることはできない。(スペルの修正、空白のクリー 44 + ンアップなど) 45 + - 対応するサブシステムメンテナが受け入れたものでなければならない。 46 + - Documentation/SubmittingPatches の規則に従ったものでなければならない。 47 + 48 + -stable ツリーにパッチを送付する手続き- 49 + 50 + - 上記の規則に従っているかを確認した後に、stable@kernel.org にパッチ 51 + を送る。 52 + - 送信者はパッチがキューに受け付けられた際には ACK を、却下された場合 53 + には NAK を受け取る。この反応は開発者たちのスケジュールによって、数 54 + 日かかる場合がある。 55 + - もし受け取られたら、パッチは他の開発者たちのレビューのために 56 + -stable キューに追加される。 57 + - セキュリティパッチはこのエイリアス (stable@kernel.org) に送られるべ 58 + きではなく、代わりに security@kernel.org のアドレスに送られる。 59 + 60 + レビューサイクル- 61 + 62 + - -stable メンテナがレビューサイクルを決めるとき、パッチはレビュー委 63 + 員会とパッチが影響する領域のメンテナ(提供者がその領域のメンテナで無 64 + い限り)に送られ、linux-kernel メーリングリストにCCされる。 65 + - レビュー委員会は 48時間の間に ACK か NAK を出す。 66 + - もしパッチが委員会のメンバから却下れるか、メンテナ達やメンバが気付 67 + かなかった問題が持ちあがり、linux-kernel メンバがパッチに異議を唱え 68 + た場合には、パッチはキューから削除される。 69 + - レビューサイクルの最後に、ACK を受けたパッチは最新の -stable リリー 70 + スに追加され、その後に新しい -stable リリースが行われる。 71 + - セキュリティパッチは、通常のレビューサイクルを通らず、セキュリティ 72 + カーネルチームから直接 -stable ツリーに受け付けられる。 73 + この手続きの詳細については kernel security チームに問い合わせること。 74 + 75 + レビュー委員会- 76 + 77 + - この委員会は、このタスクについて活動する多くのボランティアと、少数の 78 + 非ボランティアのカーネル開発者達で構成されている。 79 +
+13 -27
drivers/base/core.c
··· 423 423 int device_create_file(struct device *dev, struct device_attribute *attr) 424 424 { 425 425 int error = 0; 426 - if (get_device(dev)) { 426 + if (dev) 427 427 error = sysfs_create_file(&dev->kobj, &attr->attr); 428 - put_device(dev); 429 - } 430 428 return error; 431 429 } 432 430 ··· 435 437 */ 436 438 void device_remove_file(struct device *dev, struct device_attribute *attr) 437 439 { 438 - if (get_device(dev)) { 440 + if (dev) 439 441 sysfs_remove_file(&dev->kobj, &attr->attr); 440 - put_device(dev); 441 - } 442 442 } 443 443 444 444 /** ··· 1140 1144 } 1141 1145 EXPORT_SYMBOL_GPL(device_create); 1142 1146 1143 - /** 1144 - * find_device - finds a device that was created with device_create() 1145 - * @class: pointer to the struct class that this device was registered with 1146 - * @devt: the dev_t of the device that was previously registered 1147 - */ 1148 - static struct device *find_device(struct class *class, dev_t devt) 1147 + static int __match_devt(struct device *dev, void *data) 1149 1148 { 1150 - struct device *dev = NULL; 1151 - struct device *dev_tmp; 1149 + dev_t *devt = data; 1152 1150 1153 - down(&class->sem); 1154 - list_for_each_entry(dev_tmp, &class->devices, node) { 1155 - if (dev_tmp->devt == devt) { 1156 - dev = dev_tmp; 1157 - break; 1158 - } 1159 - } 1160 - up(&class->sem); 1161 - return dev; 1151 + return dev->devt == *devt; 1162 1152 } 1163 1153 1164 1154 /** ··· 1159 1177 { 1160 1178 struct device *dev; 1161 1179 1162 - dev = find_device(class, devt); 1163 - if (dev) 1180 + dev = class_find_device(class, &devt, __match_devt); 1181 + if (dev) { 1182 + put_device(dev); 1164 1183 device_unregister(dev); 1184 + } 1165 1185 } 1166 1186 EXPORT_SYMBOL_GPL(device_destroy); 1167 1187 ··· 1187 1203 { 1188 1204 struct device *dev; 1189 1205 1190 - dev = find_device(class, devt); 1191 - if (dev) 1206 + dev = class_find_device(class, &devt, __match_devt); 1207 + if (dev) { 1192 1208 device_pm_schedule_removal(dev); 1209 + put_device(dev); 1210 + } 1193 1211 } 1194 1212 EXPORT_SYMBOL_GPL(destroy_suspended_device); 1195 1213 #endif /* CONFIG_PM_SLEEP */
+3 -6
drivers/base/driver.c
··· 97 97 struct driver_attribute *attr) 98 98 { 99 99 int error; 100 - if (get_driver(drv)) { 100 + if (drv) 101 101 error = sysfs_create_file(&drv->p->kobj, &attr->attr); 102 - put_driver(drv); 103 - } else 102 + else 104 103 error = -EINVAL; 105 104 return error; 106 105 } ··· 113 114 void driver_remove_file(struct device_driver *drv, 114 115 struct driver_attribute *attr) 115 116 { 116 - if (get_driver(drv)) { 117 + if (drv) 117 118 sysfs_remove_file(&drv->p->kobj, &attr->attr); 118 - put_driver(drv); 119 - } 120 119 } 121 120 EXPORT_SYMBOL_GPL(driver_remove_file); 122 121
+1
drivers/base/power/main.c
··· 129 129 list_move_tail(&dev->power.entry, &dpm_destroy); 130 130 mutex_unlock(&dpm_list_mtx); 131 131 } 132 + EXPORT_SYMBOL_GPL(device_pm_schedule_removal); 132 133 133 134 /** 134 135 * pm_sleep_lock - mutual exclusion for registration and suspend
-1
drivers/base/power/power.h
··· 13 13 14 14 extern void device_pm_add(struct device *); 15 15 extern void device_pm_remove(struct device *); 16 - extern void device_pm_schedule_removal(struct device *); 17 16 extern int pm_sleep_lock(void); 18 17 extern void pm_sleep_unlock(void); 19 18
+60 -112
drivers/char/nozomi.c
··· 2 2 * nozomi.c -- HSDPA driver Broadband Wireless Data Card - Globe Trotter 3 3 * 4 4 * Written by: Ulf Jakobsson, 5 - * Jan �erfeldt, 5 + * Jan Åkerfeldt, 6 6 * Stefan Thomasson, 7 7 * 8 8 * Maintained by: Paul Hardwick (p.hardwick@option.com) ··· 36 36 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 37 37 * 38 38 * -------------------------------------------------------------------------- 39 - */ 40 - 41 - /* 42 - * CHANGELOG 43 - * Version 2.1d 44 - * 11-November-2007 Jiri Slaby, Frank Seidel 45 - * - Big rework of multicard support by Jiri 46 - * - Major cleanups (semaphore to mutex, endianess, no major reservation) 47 - * - Optimizations 48 - * 49 - * Version 2.1c 50 - * 30-October-2007 Frank Seidel 51 - * - Completed multicard support 52 - * - Minor cleanups 53 - * 54 - * Version 2.1b 55 - * 07-August-2007 Frank Seidel 56 - * - Minor cleanups 57 - * - theoretical multicard support 58 - * 59 - * Version 2.1 60 - * 03-July-2006 Paul Hardwick 61 - * 62 - * - Stability Improvements. Incorporated spinlock wraps patch. 63 - * - Updated for newer 2.6.14+ kernels (tty_buffer_request_room) 64 - * - using __devexit macro for tty 65 - * 66 - * 67 - * Version 2.0 68 - * 08-feb-2006 15:34:10:Ulf 69 - * 70 - * -Fixed issue when not waking up line disipine layer, could probably result 71 - * in better uplink performance for 2.4. 72 - * 73 - * -Fixed issue with big endian during initalization, now proper toggle flags 74 - * are handled between preloader and maincode. 75 - * 76 - * -Fixed flow control issue. 77 - * 78 - * -Added support for setting DTR. 79 - * 80 - * -For 2.4 kernels, removing temporary buffer that's not needed. 81 - * 82 - * -Reading CTS only for modem port (only port that supports it). 83 - * 84 - * -Return 0 in write_room instead of netative value, it's not handled in 85 - * upper layer. 86 - * 87 - * -------------------------------------------------------------------------- 88 - * Version 1.0 89 - * 90 - * First version of driver, only tested with card of type F32_2. 91 - * Works fine with 2.4 and 2.6 kernels. 92 - * Driver also support big endian architecture. 93 39 */ 94 40 95 41 /* Enable this to have a lot of debug printouts */ ··· 89 143 /* Do we need this settable at runtime? */ 90 144 static int debug = NOZOMI_DEBUG_LEVEL; 91 145 92 - #define D(lvl, args...) do {if (lvl & debug) NFO(KERN_DEBUG, ##args); } \ 93 - while (0) 146 + #define D(lvl, args...) do \ 147 + {if (lvl & debug) NFO(KERN_DEBUG, ##args); } \ 148 + while (0) 94 149 #define D_(lvl, args...) D(lvl, ##args) 95 150 96 151 /* These printouts are always printed */ ··· 220 273 /* Big endian */ 221 274 222 275 struct toggles { 223 - unsigned enabled:5; /* 276 + unsigned int enabled:5; /* 224 277 * Toggle fields are valid if enabled is 0, 225 278 * else A-channels must always be used. 226 279 */ 227 - unsigned diag_dl:1; 228 - unsigned mdm_dl:1; 229 - unsigned mdm_ul:1; 280 + unsigned int diag_dl:1; 281 + unsigned int mdm_dl:1; 282 + unsigned int mdm_ul:1; 230 283 } __attribute__ ((packed)); 231 284 232 285 /* Configuration table to read at startup of card */ ··· 267 320 /* This stores all control downlink flags */ 268 321 struct ctrl_dl { 269 322 u8 port; 270 - unsigned reserved:4; 271 - unsigned CTS:1; 272 - unsigned RI:1; 273 - unsigned DCD:1; 274 - unsigned DSR:1; 323 + unsigned int reserved:4; 324 + unsigned int CTS:1; 325 + unsigned int RI:1; 326 + unsigned int DCD:1; 327 + unsigned int DSR:1; 275 328 } __attribute__ ((packed)); 276 329 277 330 /* This stores all control uplink flags */ 278 331 struct ctrl_ul { 279 332 u8 port; 280 - unsigned reserved:6; 281 - unsigned RTS:1; 282 - unsigned DTR:1; 333 + unsigned int reserved:6; 334 + unsigned int RTS:1; 335 + unsigned int DTR:1; 283 336 } __attribute__ ((packed)); 284 337 285 338 #else ··· 287 340 288 341 /* This represents the toggle information */ 289 342 struct toggles { 290 - unsigned mdm_ul:1; 291 - unsigned mdm_dl:1; 292 - unsigned diag_dl:1; 293 - unsigned enabled:5; /* 343 + unsigned int mdm_ul:1; 344 + unsigned int mdm_dl:1; 345 + unsigned int diag_dl:1; 346 + unsigned int enabled:5; /* 294 347 * Toggle fields are valid if enabled is 0, 295 348 * else A-channels must always be used. 296 349 */ ··· 326 379 327 380 /* This stores all control downlink flags */ 328 381 struct ctrl_dl { 329 - unsigned DSR:1; 330 - unsigned DCD:1; 331 - unsigned RI:1; 332 - unsigned CTS:1; 333 - unsigned reserverd:4; 382 + unsigned int DSR:1; 383 + unsigned int DCD:1; 384 + unsigned int RI:1; 385 + unsigned int CTS:1; 386 + unsigned int reserverd:4; 334 387 u8 port; 335 388 } __attribute__ ((packed)); 336 389 337 390 /* This stores all control uplink flags */ 338 391 struct ctrl_ul { 339 - unsigned DTR:1; 340 - unsigned RTS:1; 341 - unsigned reserved:6; 392 + unsigned int DTR:1; 393 + unsigned int RTS:1; 394 + unsigned int reserved:6; 342 395 u8 port; 343 396 } __attribute__ ((packed)); 344 397 #endif ··· 395 448 } __attribute__ ((packed)); 396 449 397 450 /* Global variables */ 398 - static struct pci_device_id nozomi_pci_tbl[] = { 451 + static const struct pci_device_id nozomi_pci_tbl[] __devinitconst = { 399 452 {PCI_DEVICE(VENDOR1, DEVICE1)}, 400 453 {}, 401 454 }; ··· 471 524 * -Optimize 472 525 * -Rewrite cleaner 473 526 */ 474 - static u32 write_mem32(void __iomem *mem_addr_start, u32 *buf, 527 + static u32 write_mem32(void __iomem *mem_addr_start, const u32 *buf, 475 528 u32 size_bytes) 476 529 { 477 530 u32 i = 0; 478 531 u32 *ptr = (__force u32 *) mem_addr_start; 479 - u16 *buf16; 532 + const u16 *buf16; 480 533 481 534 if (unlikely(!ptr || !buf)) 482 535 return 0; ··· 484 537 /* shortcut for extremely often used cases */ 485 538 switch (size_bytes) { 486 539 case 2: /* 2 bytes */ 487 - buf16 = (u16 *) buf; 540 + buf16 = (const u16 *)buf; 488 541 writew(__cpu_to_le16(*buf16), (void __iomem *)ptr); 489 542 return 2; 490 543 break; ··· 501 554 while (i < size_bytes) { 502 555 if (size_bytes - i == 2) { 503 556 /* 2 bytes */ 504 - buf16 = (u16 *) buf; 557 + buf16 = (const u16 *)buf; 505 558 writew(__cpu_to_le16(*buf16), (void __iomem *)ptr); 506 559 i += 2; 507 560 } else { ··· 641 694 dc->config_table.ul_ctrl_len); 642 695 } 643 696 #else 644 - static __inline__ void dump_table(const struct nozomi *dc) { } 697 + static inline void dump_table(const struct nozomi *dc) { } 645 698 #endif 646 699 647 700 /* ··· 723 776 /* Enable uplink interrupts */ 724 777 static void enable_transmit_ul(enum port_type port, struct nozomi *dc) 725 778 { 726 - u16 mask[NOZOMI_MAX_PORTS] = \ 727 - {MDM_UL, DIAG_UL, APP1_UL, APP2_UL, CTRL_UL}; 779 + static const u16 mask[] = {MDM_UL, DIAG_UL, APP1_UL, APP2_UL, CTRL_UL}; 728 780 729 781 if (port < NOZOMI_MAX_PORTS) { 730 782 dc->last_ier |= mask[port]; ··· 736 790 /* Disable uplink interrupts */ 737 791 static void disable_transmit_ul(enum port_type port, struct nozomi *dc) 738 792 { 739 - u16 mask[NOZOMI_MAX_PORTS] = \ 740 - {~MDM_UL, ~DIAG_UL, ~APP1_UL, ~APP2_UL, ~CTRL_UL}; 793 + static const u16 mask[] = 794 + {~MDM_UL, ~DIAG_UL, ~APP1_UL, ~APP2_UL, ~CTRL_UL}; 741 795 742 796 if (port < NOZOMI_MAX_PORTS) { 743 797 dc->last_ier &= mask[port]; ··· 750 804 /* Enable downlink interrupts */ 751 805 static void enable_transmit_dl(enum port_type port, struct nozomi *dc) 752 806 { 753 - u16 mask[NOZOMI_MAX_PORTS] = \ 754 - {MDM_DL, DIAG_DL, APP1_DL, APP2_DL, CTRL_DL}; 807 + static const u16 mask[] = {MDM_DL, DIAG_DL, APP1_DL, APP2_DL, CTRL_DL}; 755 808 756 809 if (port < NOZOMI_MAX_PORTS) { 757 810 dc->last_ier |= mask[port]; ··· 763 818 /* Disable downlink interrupts */ 764 819 static void disable_transmit_dl(enum port_type port, struct nozomi *dc) 765 820 { 766 - u16 mask[NOZOMI_MAX_PORTS] = \ 767 - {~MDM_DL, ~DIAG_DL, ~APP1_DL, ~APP2_DL, ~CTRL_DL}; 821 + static const u16 mask[] = 822 + {~MDM_DL, ~DIAG_DL, ~APP1_DL, ~APP2_DL, ~CTRL_DL}; 768 823 769 824 if (port < NOZOMI_MAX_PORTS) { 770 825 dc->last_ier &= mask[port]; ··· 778 833 * Return 1 - send buffer to card and ack. 779 834 * Return 0 - don't ack, don't send buffer to card. 780 835 */ 781 - static int send_data(enum port_type index, struct nozomi *dc) 836 + static int send_data(enum port_type index, const struct nozomi *dc) 782 837 { 783 838 u32 size = 0; 784 - struct port *port = &dc->port[index]; 785 - u8 toggle = port->toggle_ul; 839 + const struct port *port = &dc->port[index]; 840 + const u8 toggle = port->toggle_ul; 786 841 void __iomem *addr = port->ul_addr[toggle]; 787 - u32 ul_size = port->ul_size[toggle]; 842 + const u32 ul_size = port->ul_size[toggle]; 788 843 struct tty_struct *tty = port->tty; 789 844 790 845 /* Get data from tty and place in buf for now */ ··· 1047 1102 } 1048 1103 1049 1104 /* 1050 - * Handle donlink data, ports that are handled are modem and diagnostics 1105 + * Handle downlink data, ports that are handled are modem and diagnostics 1051 1106 * Return 1 - ok 1052 1107 * Return 0 - toggle fields are out of sync 1053 1108 */ ··· 1304 1359 static ssize_t card_type_show(struct device *dev, struct device_attribute *attr, 1305 1360 char *buf) 1306 1361 { 1307 - struct nozomi *dc = pci_get_drvdata(to_pci_dev(dev)); 1362 + const struct nozomi *dc = pci_get_drvdata(to_pci_dev(dev)); 1308 1363 1309 1364 return sprintf(buf, "%d\n", dc->card_type); 1310 1365 } 1311 - static DEVICE_ATTR(card_type, 0444, card_type_show, NULL); 1366 + static DEVICE_ATTR(card_type, S_IRUGO, card_type_show, NULL); 1312 1367 1313 1368 static ssize_t open_ttys_show(struct device *dev, struct device_attribute *attr, 1314 1369 char *buf) 1315 1370 { 1316 - struct nozomi *dc = pci_get_drvdata(to_pci_dev(dev)); 1371 + const struct nozomi *dc = pci_get_drvdata(to_pci_dev(dev)); 1317 1372 1318 1373 return sprintf(buf, "%u\n", dc->open_ttys); 1319 1374 } 1320 - static DEVICE_ATTR(open_ttys, 0444, open_ttys_show, NULL); 1375 + static DEVICE_ATTR(open_ttys, S_IRUGO, open_ttys_show, NULL); 1321 1376 1322 1377 static void make_sysfs_files(struct nozomi *dc) 1323 1378 { ··· 1680 1735 { 1681 1736 struct port *port = tty->driver_data; 1682 1737 int room = 0; 1683 - struct nozomi *dc = get_dc_by_tty(tty); 1738 + const struct nozomi *dc = get_dc_by_tty(tty); 1684 1739 1685 1740 if (!dc || !port) 1686 1741 return 0; ··· 1700 1755 /* Gets io control parameters */ 1701 1756 static int ntty_tiocmget(struct tty_struct *tty, struct file *file) 1702 1757 { 1703 - struct port *port = tty->driver_data; 1704 - struct ctrl_dl *ctrl_dl = &port->ctrl_dl; 1705 - struct ctrl_ul *ctrl_ul = &port->ctrl_ul; 1758 + const struct port *port = tty->driver_data; 1759 + const struct ctrl_dl *ctrl_dl = &port->ctrl_dl; 1760 + const struct ctrl_ul *ctrl_ul = &port->ctrl_ul; 1706 1761 1707 1762 return (ctrl_ul->RTS ? TIOCM_RTS : 0) | 1708 1763 (ctrl_ul->DTR ? TIOCM_DTR : 0) | ··· 1732 1787 static int ntty_cflags_changed(struct port *port, unsigned long flags, 1733 1788 struct async_icount *cprev) 1734 1789 { 1735 - struct async_icount cnow = port->tty_icount; 1790 + const struct async_icount cnow = port->tty_icount; 1736 1791 int ret; 1737 1792 1738 1793 ret = ((flags & TIOCM_RNG) && (cnow.rng != cprev->rng)) || ··· 1747 1802 1748 1803 static int ntty_ioctl_tiocgicount(struct port *port, void __user *argp) 1749 1804 { 1750 - struct async_icount cnow = port->tty_icount; 1805 + const struct async_icount cnow = port->tty_icount; 1751 1806 struct serial_icounter_struct icount; 1752 1807 1753 1808 icount.cts = cnow.cts; ··· 1827 1882 /* just to discard single character writes */ 1828 1883 static void ntty_put_char(struct tty_struct *tty, unsigned char c) 1829 1884 { 1830 - /* FIXME !!! */ 1885 + /* 1886 + * card does not react correct when we write single chars 1887 + * to the card, so we discard them 1888 + */ 1831 1889 DBG2("PUT CHAR Function: %c", c); 1832 1890 } 1833 1891 ··· 1858 1910 return rval; 1859 1911 } 1860 1912 1861 - static struct tty_operations tty_ops = { 1913 + static const struct tty_operations tty_ops = { 1862 1914 .ioctl = ntty_ioctl, 1863 1915 .open = ntty_open, 1864 1916 .close = ntty_close,
+6
include/linux/device.h
··· 534 534 extern void device_destroy(struct class *cls, dev_t devt); 535 535 #ifdef CONFIG_PM_SLEEP 536 536 extern void destroy_suspended_device(struct class *cls, dev_t devt); 537 + extern void device_pm_schedule_removal(struct device *); 537 538 #else /* !CONFIG_PM_SLEEP */ 538 539 static inline void destroy_suspended_device(struct class *cls, dev_t devt) 539 540 { 540 541 device_destroy(cls, devt); 542 + } 543 + 544 + static inline void device_pm_schedule_removal(struct device *dev) 545 + { 546 + device_unregister(dev); 541 547 } 542 548 #endif /* !CONFIG_PM_SLEEP */ 543 549
+1 -2
kernel/Makefile
··· 9 9 rcupdate.o extable.o params.o posix-timers.o \ 10 10 kthread.o wait.o kfifo.o sys_ni.o posix-cpu-timers.o mutex.o \ 11 11 hrtimer.o rwsem.o latency.o nsproxy.o srcu.o \ 12 - utsname.o notifier.o 12 + utsname.o notifier.o ksysfs.o 13 13 14 14 obj-$(CONFIG_SYSCTL) += sysctl_check.o 15 15 obj-$(CONFIG_STACKTRACE) += stacktrace.o ··· 49 49 obj-$(CONFIG_AUDITSYSCALL) += auditsc.o 50 50 obj-$(CONFIG_AUDIT_TREE) += audit_tree.o 51 51 obj-$(CONFIG_KPROBES) += kprobes.o 52 - obj-$(CONFIG_SYSFS) += ksysfs.o 53 52 obj-$(CONFIG_DETECT_SOFTLOCKUP) += softlockup.o 54 53 obj-$(CONFIG_GENERIC_HARDIRQS) += irq/ 55 54 obj-$(CONFIG_SECCOMP) += seccomp.o
+1 -1
lib/kobject.c
··· 637 637 * @name: the name for the kset 638 638 * @parent: the parent kobject of this kobject, if any. 639 639 * 640 - * This function creates a kset structure dynamically and registers it 640 + * This function creates a kobject structure dynamically and registers it 641 641 * with sysfs. When you are finished with this structure, call 642 642 * kobject_put() and the structure will be dynamically freed when 643 643 * it is no longer being used.