aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/parisc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-04 21:04:48 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-04 21:04:48 -0400
commit5b339915762d30b21995aa7263e74081f2f1110a (patch)
tree4e076dbd27025054b21dddd78a1cb3fef3de34d7 /drivers/parisc
parent89661adaaee2f85116b399e642129ccd4dafd195 (diff)
parent823bccfc4002296ba88c3ad0f049e1abd8108d30 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6: remove "struct subsystem" as it is no longer needed sysfs: printk format warning DOC: Fix wrong identifier name in Documentation/driver-model/devres.txt platform: reorder platform_device_del Driver core: fix show_uevent from taking up way too much stack
Diffstat (limited to 'drivers/parisc')
-rw-r--r--drivers/parisc/pdc_stable.c94
1 files changed, 47 insertions, 47 deletions
diff --git a/drivers/parisc/pdc_stable.c b/drivers/parisc/pdc_stable.c
index ea1b7a63598e..815e445c3125 100644
--- a/drivers/parisc/pdc_stable.c
+++ b/drivers/parisc/pdc_stable.c
@@ -520,17 +520,17 @@ static struct pdcspath_entry *pdcspath_entries[] = {
520 520
521/** 521/**
522 * pdcs_size_read - Stable Storage size output. 522 * pdcs_size_read - Stable Storage size output.
523 * @entry: An allocated and populated subsytem struct. We don't use it tho. 523 * @kset: An allocated and populated struct kset. We don't use it tho.
524 * @buf: The output buffer to write to. 524 * @buf: The output buffer to write to.
525 */ 525 */
526static ssize_t 526static ssize_t
527pdcs_size_read(struct subsystem *entry, char *buf) 527pdcs_size_read(struct kset *kset, char *buf)
528{ 528{
529 char *out = buf; 529 char *out = buf;
530 530
531 if (!entry || !buf) 531 if (!kset || !buf)
532 return -EINVAL; 532 return -EINVAL;
533 533
534 /* show the size of the stable storage */ 534 /* show the size of the stable storage */
535 out += sprintf(out, "%ld\n", pdcs_size); 535 out += sprintf(out, "%ld\n", pdcs_size);
536 536
@@ -539,17 +539,17 @@ pdcs_size_read(struct subsystem *entry, char *buf)
539 539
540/** 540/**
541 * pdcs_auto_read - Stable Storage autoboot/search flag output. 541 * pdcs_auto_read - Stable Storage autoboot/search flag output.
542 * @entry: An allocated and populated subsytem struct. We don't use it tho. 542 * @kset: An allocated and populated struct kset. We don't use it tho.
543 * @buf: The output buffer to write to. 543 * @buf: The output buffer to write to.
544 * @knob: The PF_AUTOBOOT or PF_AUTOSEARCH flag 544 * @knob: The PF_AUTOBOOT or PF_AUTOSEARCH flag
545 */ 545 */
546static ssize_t 546static ssize_t
547pdcs_auto_read(struct subsystem *entry, char *buf, int knob) 547pdcs_auto_read(struct kset *kset, char *buf, int knob)
548{ 548{
549 char *out = buf; 549 char *out = buf;
550 struct pdcspath_entry *pathentry; 550 struct pdcspath_entry *pathentry;
551 551
552 if (!entry || !buf) 552 if (!kset || !buf)
553 return -EINVAL; 553 return -EINVAL;
554 554
555 /* Current flags are stored in primary boot path entry */ 555 /* Current flags are stored in primary boot path entry */
@@ -565,40 +565,40 @@ pdcs_auto_read(struct subsystem *entry, char *buf, int knob)
565 565
566/** 566/**
567 * pdcs_autoboot_read - Stable Storage autoboot flag output. 567 * pdcs_autoboot_read - Stable Storage autoboot flag output.
568 * @entry: An allocated and populated subsytem struct. We don't use it tho. 568 * @kset: An allocated and populated struct kset. We don't use it tho.
569 * @buf: The output buffer to write to. 569 * @buf: The output buffer to write to.
570 */ 570 */
571static inline ssize_t 571static inline ssize_t
572pdcs_autoboot_read(struct subsystem *entry, char *buf) 572pdcs_autoboot_read(struct kset *kset, char *buf)
573{ 573{
574 return pdcs_auto_read(entry, buf, PF_AUTOBOOT); 574 return pdcs_auto_read(kset, buf, PF_AUTOBOOT);
575} 575}
576 576
577/** 577/**
578 * pdcs_autosearch_read - Stable Storage autoboot flag output. 578 * pdcs_autosearch_read - Stable Storage autoboot flag output.
579 * @entry: An allocated and populated subsytem struct. We don't use it tho. 579 * @kset: An allocated and populated struct kset. We don't use it tho.
580 * @buf: The output buffer to write to. 580 * @buf: The output buffer to write to.
581 */ 581 */
582static inline ssize_t 582static inline ssize_t
583pdcs_autosearch_read(struct subsystem *entry, char *buf) 583pdcs_autosearch_read(struct kset *kset, char *buf)
584{ 584{
585 return pdcs_auto_read(entry, buf, PF_AUTOSEARCH); 585 return pdcs_auto_read(kset, buf, PF_AUTOSEARCH);
586} 586}
587 587
588/** 588/**
589 * pdcs_timer_read - Stable Storage timer count output (in seconds). 589 * pdcs_timer_read - Stable Storage timer count output (in seconds).
590 * @entry: An allocated and populated subsytem struct. We don't use it tho. 590 * @kset: An allocated and populated struct kset. We don't use it tho.
591 * @buf: The output buffer to write to. 591 * @buf: The output buffer to write to.
592 * 592 *
593 * The value of the timer field correponds to a number of seconds in powers of 2. 593 * The value of the timer field correponds to a number of seconds in powers of 2.
594 */ 594 */
595static ssize_t 595static ssize_t
596pdcs_timer_read(struct subsystem *entry, char *buf) 596pdcs_timer_read(struct kset *kset, char *buf)
597{ 597{
598 char *out = buf; 598 char *out = buf;
599 struct pdcspath_entry *pathentry; 599 struct pdcspath_entry *pathentry;
600 600
601 if (!entry || !buf) 601 if (!kset || !buf)
602 return -EINVAL; 602 return -EINVAL;
603 603
604 /* Current flags are stored in primary boot path entry */ 604 /* Current flags are stored in primary boot path entry */
@@ -615,15 +615,15 @@ pdcs_timer_read(struct subsystem *entry, char *buf)
615 615
616/** 616/**
617 * pdcs_osid_read - Stable Storage OS ID register output. 617 * pdcs_osid_read - Stable Storage OS ID register output.
618 * @entry: An allocated and populated subsytem struct. We don't use it tho. 618 * @kset: An allocated and populated struct kset. We don't use it tho.
619 * @buf: The output buffer to write to. 619 * @buf: The output buffer to write to.
620 */ 620 */
621static ssize_t 621static ssize_t
622pdcs_osid_read(struct subsystem *entry, char *buf) 622pdcs_osid_read(struct kset *kset, char *buf)
623{ 623{
624 char *out = buf; 624 char *out = buf;
625 625
626 if (!entry || !buf) 626 if (!kset || !buf)
627 return -EINVAL; 627 return -EINVAL;
628 628
629 out += sprintf(out, "%s dependent data (0x%.4x)\n", 629 out += sprintf(out, "%s dependent data (0x%.4x)\n",
@@ -634,18 +634,18 @@ pdcs_osid_read(struct subsystem *entry, char *buf)
634 634
635/** 635/**
636 * pdcs_osdep1_read - Stable Storage OS-Dependent data area 1 output. 636 * pdcs_osdep1_read - Stable Storage OS-Dependent data area 1 output.
637 * @entry: An allocated and populated subsytem struct. We don't use it tho. 637 * @kset: An allocated and populated struct kset. We don't use it tho.
638 * @buf: The output buffer to write to. 638 * @buf: The output buffer to write to.
639 * 639 *
640 * This can hold 16 bytes of OS-Dependent data. 640 * This can hold 16 bytes of OS-Dependent data.
641 */ 641 */
642static ssize_t 642static ssize_t
643pdcs_osdep1_read(struct subsystem *entry, char *buf) 643pdcs_osdep1_read(struct kset *kset, char *buf)
644{ 644{
645 char *out = buf; 645 char *out = buf;
646 u32 result[4]; 646 u32 result[4];
647 647
648 if (!entry || !buf) 648 if (!kset || !buf)
649 return -EINVAL; 649 return -EINVAL;
650 650
651 if (pdc_stable_read(PDCS_ADDR_OSD1, &result, sizeof(result)) != PDC_OK) 651 if (pdc_stable_read(PDCS_ADDR_OSD1, &result, sizeof(result)) != PDC_OK)
@@ -661,18 +661,18 @@ pdcs_osdep1_read(struct subsystem *entry, char *buf)
661 661
662/** 662/**
663 * pdcs_diagnostic_read - Stable Storage Diagnostic register output. 663 * pdcs_diagnostic_read - Stable Storage Diagnostic register output.
664 * @entry: An allocated and populated subsytem struct. We don't use it tho. 664 * @kset: An allocated and populated struct kset. We don't use it tho.
665 * @buf: The output buffer to write to. 665 * @buf: The output buffer to write to.
666 * 666 *
667 * I have NFC how to interpret the content of that register ;-). 667 * I have NFC how to interpret the content of that register ;-).
668 */ 668 */
669static ssize_t 669static ssize_t
670pdcs_diagnostic_read(struct subsystem *entry, char *buf) 670pdcs_diagnostic_read(struct kset *kset, char *buf)
671{ 671{
672 char *out = buf; 672 char *out = buf;
673 u32 result; 673 u32 result;
674 674
675 if (!entry || !buf) 675 if (!kset || !buf)
676 return -EINVAL; 676 return -EINVAL;
677 677
678 /* get diagnostic */ 678 /* get diagnostic */
@@ -686,18 +686,18 @@ pdcs_diagnostic_read(struct subsystem *entry, char *buf)
686 686
687/** 687/**
688 * pdcs_fastsize_read - Stable Storage FastSize register output. 688 * pdcs_fastsize_read - Stable Storage FastSize register output.
689 * @entry: An allocated and populated subsytem struct. We don't use it tho. 689 * @kset: An allocated and populated struct kset. We don't use it tho.
690 * @buf: The output buffer to write to. 690 * @buf: The output buffer to write to.
691 * 691 *
692 * This register holds the amount of system RAM to be tested during boot sequence. 692 * This register holds the amount of system RAM to be tested during boot sequence.
693 */ 693 */
694static ssize_t 694static ssize_t
695pdcs_fastsize_read(struct subsystem *entry, char *buf) 695pdcs_fastsize_read(struct kset *kset, char *buf)
696{ 696{
697 char *out = buf; 697 char *out = buf;
698 u32 result; 698 u32 result;
699 699
700 if (!entry || !buf) 700 if (!kset || !buf)
701 return -EINVAL; 701 return -EINVAL;
702 702
703 /* get fast-size */ 703 /* get fast-size */
@@ -715,13 +715,13 @@ pdcs_fastsize_read(struct subsystem *entry, char *buf)
715 715
716/** 716/**
717 * pdcs_osdep2_read - Stable Storage OS-Dependent data area 2 output. 717 * pdcs_osdep2_read - Stable Storage OS-Dependent data area 2 output.
718 * @entry: An allocated and populated subsytem struct. We don't use it tho. 718 * @kset: An allocated and populated struct kset. We don't use it tho.
719 * @buf: The output buffer to write to. 719 * @buf: The output buffer to write to.
720 * 720 *
721 * This can hold pdcs_size - 224 bytes of OS-Dependent data, when available. 721 * This can hold pdcs_size - 224 bytes of OS-Dependent data, when available.
722 */ 722 */
723static ssize_t 723static ssize_t
724pdcs_osdep2_read(struct subsystem *entry, char *buf) 724pdcs_osdep2_read(struct kset *kset, char *buf)
725{ 725{
726 char *out = buf; 726 char *out = buf;
727 unsigned long size; 727 unsigned long size;
@@ -733,7 +733,7 @@ pdcs_osdep2_read(struct subsystem *entry, char *buf)
733 733
734 size = pdcs_size - 224; 734 size = pdcs_size - 224;
735 735
736 if (!entry || !buf) 736 if (!kset || !buf)
737 return -EINVAL; 737 return -EINVAL;
738 738
739 for (i=0; i<size; i+=4) { 739 for (i=0; i<size; i+=4) {
@@ -748,7 +748,7 @@ pdcs_osdep2_read(struct subsystem *entry, char *buf)
748 748
749/** 749/**
750 * pdcs_auto_write - This function handles autoboot/search flag modifying. 750 * pdcs_auto_write - This function handles autoboot/search flag modifying.
751 * @entry: An allocated and populated subsytem struct. We don't use it tho. 751 * @kset: An allocated and populated struct kset. We don't use it tho.
752 * @buf: The input buffer to read from. 752 * @buf: The input buffer to read from.
753 * @count: The number of bytes to be read. 753 * @count: The number of bytes to be read.
754 * @knob: The PF_AUTOBOOT or PF_AUTOSEARCH flag 754 * @knob: The PF_AUTOBOOT or PF_AUTOSEARCH flag
@@ -758,7 +758,7 @@ pdcs_osdep2_read(struct subsystem *entry, char *buf)
758 * \"n\" (n == 0 or 1) to toggle AutoBoot Off or On 758 * \"n\" (n == 0 or 1) to toggle AutoBoot Off or On
759 */ 759 */
760static ssize_t 760static ssize_t
761pdcs_auto_write(struct subsystem *entry, const char *buf, size_t count, int knob) 761pdcs_auto_write(struct kset *kset, const char *buf, size_t count, int knob)
762{ 762{
763 struct pdcspath_entry *pathentry; 763 struct pdcspath_entry *pathentry;
764 unsigned char flags; 764 unsigned char flags;
@@ -768,7 +768,7 @@ pdcs_auto_write(struct subsystem *entry, const char *buf, size_t count, int knob
768 if (!capable(CAP_SYS_ADMIN)) 768 if (!capable(CAP_SYS_ADMIN))
769 return -EACCES; 769 return -EACCES;
770 770
771 if (!entry || !buf || !count) 771 if (!kset || !buf || !count)
772 return -EINVAL; 772 return -EINVAL;
773 773
774 /* We'll use a local copy of buf */ 774 /* We'll use a local copy of buf */
@@ -823,7 +823,7 @@ parse_error:
823 823
824/** 824/**
825 * pdcs_autoboot_write - This function handles autoboot flag modifying. 825 * pdcs_autoboot_write - This function handles autoboot flag modifying.
826 * @entry: An allocated and populated subsytem struct. We don't use it tho. 826 * @kset: An allocated and populated struct kset. We don't use it tho.
827 * @buf: The input buffer to read from. 827 * @buf: The input buffer to read from.
828 * @count: The number of bytes to be read. 828 * @count: The number of bytes to be read.
829 * 829 *
@@ -832,14 +832,14 @@ parse_error:
832 * \"n\" (n == 0 or 1) to toggle AutoSearch Off or On 832 * \"n\" (n == 0 or 1) to toggle AutoSearch Off or On
833 */ 833 */
834static inline ssize_t 834static inline ssize_t
835pdcs_autoboot_write(struct subsystem *entry, const char *buf, size_t count) 835pdcs_autoboot_write(struct kset *kset, const char *buf, size_t count)
836{ 836{
837 return pdcs_auto_write(entry, buf, count, PF_AUTOBOOT); 837 return pdcs_auto_write(kset, buf, count, PF_AUTOBOOT);
838} 838}
839 839
840/** 840/**
841 * pdcs_autosearch_write - This function handles autosearch flag modifying. 841 * pdcs_autosearch_write - This function handles autosearch flag modifying.
842 * @entry: An allocated and populated subsytem struct. We don't use it tho. 842 * @kset: An allocated and populated struct kset. We don't use it tho.
843 * @buf: The input buffer to read from. 843 * @buf: The input buffer to read from.
844 * @count: The number of bytes to be read. 844 * @count: The number of bytes to be read.
845 * 845 *
@@ -848,14 +848,14 @@ pdcs_autoboot_write(struct subsystem *entry, const char *buf, size_t count)
848 * \"n\" (n == 0 or 1) to toggle AutoSearch Off or On 848 * \"n\" (n == 0 or 1) to toggle AutoSearch Off or On
849 */ 849 */
850static inline ssize_t 850static inline ssize_t
851pdcs_autosearch_write(struct subsystem *entry, const char *buf, size_t count) 851pdcs_autosearch_write(struct kset *kset, const char *buf, size_t count)
852{ 852{
853 return pdcs_auto_write(entry, buf, count, PF_AUTOSEARCH); 853 return pdcs_auto_write(kset, buf, count, PF_AUTOSEARCH);
854} 854}
855 855
856/** 856/**
857 * pdcs_osdep1_write - Stable Storage OS-Dependent data area 1 input. 857 * pdcs_osdep1_write - Stable Storage OS-Dependent data area 1 input.
858 * @entry: An allocated and populated subsytem struct. We don't use it tho. 858 * @kset: An allocated and populated struct kset. We don't use it tho.
859 * @buf: The input buffer to read from. 859 * @buf: The input buffer to read from.
860 * @count: The number of bytes to be read. 860 * @count: The number of bytes to be read.
861 * 861 *
@@ -864,14 +864,14 @@ pdcs_autosearch_write(struct subsystem *entry, const char *buf, size_t count)
864 * its input buffer. 864 * its input buffer.
865 */ 865 */
866static ssize_t 866static ssize_t
867pdcs_osdep1_write(struct subsystem *entry, const char *buf, size_t count) 867pdcs_osdep1_write(struct kset *kset, const char *buf, size_t count)
868{ 868{
869 u8 in[16]; 869 u8 in[16];
870 870
871 if (!capable(CAP_SYS_ADMIN)) 871 if (!capable(CAP_SYS_ADMIN))
872 return -EACCES; 872 return -EACCES;
873 873
874 if (!entry || !buf || !count) 874 if (!kset || !buf || !count)
875 return -EINVAL; 875 return -EINVAL;
876 876
877 if (unlikely(pdcs_osid != OS_ID_LINUX)) 877 if (unlikely(pdcs_osid != OS_ID_LINUX))
@@ -892,7 +892,7 @@ pdcs_osdep1_write(struct subsystem *entry, const char *buf, size_t count)
892 892
893/** 893/**
894 * pdcs_osdep2_write - Stable Storage OS-Dependent data area 2 input. 894 * pdcs_osdep2_write - Stable Storage OS-Dependent data area 2 input.
895 * @entry: An allocated and populated subsytem struct. We don't use it tho. 895 * @kset: An allocated and populated struct kset. We don't use it tho.
896 * @buf: The input buffer to read from. 896 * @buf: The input buffer to read from.
897 * @count: The number of bytes to be read. 897 * @count: The number of bytes to be read.
898 * 898 *
@@ -901,7 +901,7 @@ pdcs_osdep1_write(struct subsystem *entry, const char *buf, size_t count)
901 * constructing its input buffer. 901 * constructing its input buffer.
902 */ 902 */
903static ssize_t 903static ssize_t
904pdcs_osdep2_write(struct subsystem *entry, const char *buf, size_t count) 904pdcs_osdep2_write(struct kset *kset, const char *buf, size_t count)
905{ 905{
906 unsigned long size; 906 unsigned long size;
907 unsigned short i; 907 unsigned short i;
@@ -910,7 +910,7 @@ pdcs_osdep2_write(struct subsystem *entry, const char *buf, size_t count)
910 if (!capable(CAP_SYS_ADMIN)) 910 if (!capable(CAP_SYS_ADMIN))
911 return -EACCES; 911 return -EACCES;
912 912
913 if (!entry || !buf || !count) 913 if (!kset || !buf || !count)
914 return -EINVAL; 914 return -EINVAL;
915 915
916 if (unlikely(pdcs_size <= 224)) 916 if (unlikely(pdcs_size <= 224))