I'm sorry but this is just not true. You say the kind of people who deserve a patent would do the work either way and then you suggest a handful of people. Many, many people have created things for the purpose of making money. Your world would eliminate people like Steve Jobs and Bill Gates. Later in life, when Jobs had billions, he didn't seem to care about money anymore but in the beginning Apple tried everything. They even had a clothing line.
As for your examples, Linus didn't invent. He made a version of an existing OS and started with an existing version of a copy of that OS. He did it for fun, but one must also recognize that he's gained a tremendous amount by this seemingly "benevolent" action. Fresh out of college he could take much more interesting jobs than most people with his background could. His "gift" ended up being a loss leader for his career.
So if we were reliant on only having people like Tesla to push us forward we'd be nowhere near where we are today. Tesla was brilliant but there are just far too few people who think and work as he did.