Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 273539 | Differences between
and this patch

Collapse All | Expand All

(-)file_not_specified_in_diff (-1 / +20 lines)
Line  Link Here
0
-- usr/src/nv/nv.c.orig 
0
++ usr/src/nv/nv.c 
Lines 16-21 Link Here
16
#include "os-agp.h"
16
#include "os-agp.h"
17
#include "nv-vm.h"
17
#include "nv-vm.h"
18
#include "nv-reg.h"
18
#include "nv-reg.h"
19
#include <linux/version.h>
19
20
20
#ifdef MODULE_ALIAS_CHARDEV_MAJOR
21
#ifdef MODULE_ALIAS_CHARDEV_MAJOR
21
MODULE_ALIAS_CHARDEV_MAJOR(NV_MAJOR_DEVICE_NUMBER);
22
MODULE_ALIAS_CHARDEV_MAJOR(NV_MAJOR_DEVICE_NUMBER);
Lines 607-615 Link Here
607
     * Set the module owner to ensure that the reference
608
     * Set the module owner to ensure that the reference
608
     * count reflects accesses to the proc files.
609
     * count reflects accesses to the proc files.
609
     */
610
     */
611
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
610
    proc_nvidia->owner = THIS_MODULE;
612
    proc_nvidia->owner = THIS_MODULE;
611
    proc_nvidia_cards->owner = THIS_MODULE;
613
    proc_nvidia_cards->owner = THIS_MODULE;
612
    proc_nvidia_warnings->owner = THIS_MODULE;
614
    proc_nvidia_warnings->owner = THIS_MODULE;
615
#endif
613
616
614
    for (j = 0; j < num_nv_devices; j++)
617
    for (j = 0; j < num_nv_devices; j++)
615
    {
618
    {
Lines 629-635 Link Here
629
632
630
        entry->data = nv;
633
        entry->data = nv;
631
        entry->read_proc = nv_kern_read_cardinfo;
634
        entry->read_proc = nv_kern_read_cardinfo;
635
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
632
        entry->owner = THIS_MODULE;
636
        entry->owner = THIS_MODULE;
637
#endif
633
638
634
        if (nvos_find_agp_capability(dev)) {
639
        if (nvos_find_agp_capability(dev)) {
635
            /*
640
            /*
Lines 642-648 Link Here
642
                goto failed;
647
                goto failed;
643
            }
648
            }
644
649
650
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
645
            entry->owner = THIS_MODULE;
651
            entry->owner = THIS_MODULE;
652
#endif
646
            proc_nvidia_agp = entry;
653
            proc_nvidia_agp = entry;
647
654
648
            entry = create_proc_entry("status", flags, proc_nvidia_agp);
655
            entry = create_proc_entry("status", flags, proc_nvidia_agp);
Lines 653-659 Link Here
653
660
654
            entry->data = nv;
661
            entry->data = nv;
655
            entry->read_proc = nv_kern_read_status;
662
            entry->read_proc = nv_kern_read_status;
663
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
656
            entry->owner = THIS_MODULE;
664
            entry->owner = THIS_MODULE;
665
#endif
657
666
658
            entry = create_proc_entry("host-bridge", flags, proc_nvidia_agp);
667
            entry = create_proc_entry("host-bridge", flags, proc_nvidia_agp);
659
            if (!entry) {
668
            if (!entry) {
Lines 663-669 Link Here
663
672
664
            entry->data = NULL;
673
            entry->data = NULL;
665
            entry->read_proc = nv_kern_read_agpinfo;
674
            entry->read_proc = nv_kern_read_agpinfo;
675
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
666
            entry->owner = THIS_MODULE;
676
            entry->owner = THIS_MODULE;
677
#endif
667
678
668
            entry = create_proc_entry("card", flags, proc_nvidia_agp);
679
            entry = create_proc_entry("card", flags, proc_nvidia_agp);
669
            if (!entry) {
680
            if (!entry) {
Lines 673-679 Link Here
673
684
674
            entry->data = nv;
685
            entry->data = nv;
675
            entry->read_proc = nv_kern_read_agpinfo;
686
            entry->read_proc = nv_kern_read_agpinfo;
687
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
676
            entry->owner = THIS_MODULE;
688
            entry->owner = THIS_MODULE;
689
#endif
677
        }
690
        }
678
691
679
        NV_PCI_DEV_PUT(dev);
692
        NV_PCI_DEV_PUT(dev);
Lines 684-697 Link Here
684
        goto failed;
697
        goto failed;
685
698
686
    entry->read_proc = nv_kern_read_version;
699
    entry->read_proc = nv_kern_read_version;
700
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
687
    entry->owner = THIS_MODULE;
701
    entry->owner = THIS_MODULE;
702
#endif
688
703
689
    entry = create_proc_entry("registry", flags, proc_nvidia);
704
    entry = create_proc_entry("registry", flags, proc_nvidia);
690
    if (!entry)
705
    if (!entry)
691
        goto failed;
706
        goto failed;
692
707
693
    entry->read_proc = nv_kern_read_registry;
708
    entry->read_proc = nv_kern_read_registry;
709
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
694
    entry->owner = THIS_MODULE;
710
    entry->owner = THIS_MODULE;
711
#endif
695
712
696
    return;
713
    return;
697
714
Lines 718-724 Link Here
718
735
719
    entry->data = (void *)message;
736
    entry->data = (void *)message;
720
    entry->read_proc = nv_kern_read_warning;
737
    entry->read_proc = nv_kern_read_warning;
738
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
721
    entry->owner = THIS_MODULE;
739
    entry->owner = THIS_MODULE;
740
#endif
722
#endif
741
#endif
723
}
742
}
724
743

Return to bug 273539